I operate a site which has on the order of 600,000 user-contributed images. We use ImageMagick for thumbnailing purposes.
We've been running
Code: Select all
convert oldimg.jpg -resize 150x150 newimg.jpg
In all my investigation of this I've found lots of guides on how to correctly convert to RGB and then back to sRGB after resizing and so on, or using -distort Resize in concert with that, but I have yet to find a way to correct gamma/colorspace generically. This being user-generated content there's a smorgasbord of different source colorspaces and formats and bit depths etc.
Is there a way to signal to convert that gamma, colorspace etc should be preserved when resizing, or a way to generically convert from colorspaces to a consistent output colorspace, without needing to first look at the source image and pick from a list of recipes to correctly resize without issue?
I'm using Wheezy's packages (6.7.7-10 2014-03-08 Q16/OpenMP). The issue of grayscale stuff not being corrected when resized does seem to be a regression from my Precise test box, which works fine with 6.6.9-7 2014-03-06 Q16/OpenMP, and may be a bug, but I wouldn't know how to confirm this/report it as such).