"as01" <[email protected]> wrote: | Our company has used ImageMagick for many years to successfully generate | thumbnails. Since Feb 4th of this year we have used | ImageMagick-6.4.9-2-Q16-windows-dll.exe and that has worked fine. | | On Tuesday I upgraded to ImageMagick-6.5.6-10-Q16-windows-dll.exe and | am now getting complaints (from multiple customers) that our thumbnails | are fuzzy. |
Fred Weinhaus <[email protected]> wrote: | I don't know if this is relevant or not. Anthony would be best to | answer this. But at some point (not sure what release) some of the | resize filters also used for thumbnail went through some changes and | new additions. I don't know if the default filter changed. But you | can try using -filter with various filters and expert settings to | recreate your old looking images. | | see http://www.imagemagick.org/Usage/resize/#filter | | you can check the changelog to see if you can find when this occurred. | | see http://www.imagemagick.org/script/changelog.php | The major overhaul of the resize filters pre-dated the upgrade. That is you were already using the resize updated BEFORE you upgraded. As such their should not be any change in regard to resize filters. Also those filter changes did not actually effect the default resize filter, Its effects was more in general handling of the filters, the fixing of specialised 'windowing' filters whcih were being incorrectly applied (For example Blackman), increase in the 'support' used for Gaussian filters, Added controls for Cubic Filters, and the addition of about half-dozen new filters. None of which effects the results of the default filters. "as01" <[email protected]> wrote: | Using ImageMagick 6.4.9-2-Q16 we get this: | | http://87.252.62.61/thumb/th140_64.jpg | | With ImageMagick 6.5.6-10-Q16 we get this: (fuzzier, specifically with the | girl's freckles washed out) | | http://87.252.62.61/thumb/th140_65.jpg | | I have copied our build script and linked to the original source image and | shown both thumbs side-by-side at | http://87.252.62.61/thumb/side_by_side.html | I can definatally see a major difference in the results. It looks to me like the unsharp process is not being applied But also as you are NOT reading the image BEFORE applying the operations their is no gurantee that the operations will be applied in the right order. As such it may be that the unsharp is now being applied before the resize (via thumbnail)!!!! The MAJOR difference between versions that would effect yoru results is the use of -size for JPEG read restriction. Because -size is used as part of image generators (creating images internally) users have for years been complaing of JPG problems when -size was used. As such -size for JPG reading is now a specific 'coder' option rather than overloading the -size option. As such you should now use -define jpeg:size=420x420 See Reading JPEG Images http://www.imagemagick.org/Usage/formats/#jpg_read That should fix your problem and bring back yoru former behaviour. HOWEVER, and I hope you take the criticism well... 1/ Also I have always recommended that JPEG size read option should be double that of the final resize size. This provides the resize option room to manover when applying its filters. As such using a 'too small' a JPEG size will have contributed to your 'unnatural' image sharpening. Generating something more akin to 'sample' or low size changing 'adaptive-resize' (mesh interpolated filter resize) than a proper resize. 2/ Your option order is wrong. Remember Im wants to apply all operations in the order you give. However you are NOT reading the image BEFORE applying the operations. This means you are using a legacy mode of operation which 'saves up' operations for later use. Because of this there is no gurantee that the operations will be applied in the right order. As such it may be that the unsharp is now being applied before the resize (via thumbnail)!!!! Though actually knowing the internal workings of legacy (and years of experience) this would not be a problem in this case. It may however become a problem for IM v7 as legacy mode may be removed to allow the use of 'operation pipelines', and the reading of operations from files. 3/ Next is your 'sharpen' operation. It is far too small to really do anything! Especially as your 'radius' (or neighbourhood) is too small to be of any effective use (it also should be an interger). And your 'sigma' is so low as to barly do anything!!!! In other words your 'sharpen' may as well be a no-op. It is suggested you use a radius of '0' which also has a minimum radius (neighbourhood) of '5'. The only time a smaller radius is desirable is for speed (not a problem with thumbnails) OR morphological operators which you are not going. Actually unsharp is a better 'sharpening' operator. It is also the one used by photoshop! However I am not certain exactly what options they use. 4/ JPEG usally contain color profiles as such using -colorspace for handling CMYK jpeg is not the right solution. Unfortunatally what is the right way varies greatly depending on the source image :-) And I am no expert in this matter, so I'll leave that. 5/ Lastly. Why do you process the image twice? Sure this would have improved your thumbnails because of your strong JPEG read size but saving then re-reading jpegs is NEVER recommended. JPEG is a lossy file format, and mean for display purposes. It was never meant to be used as an intermediate file format. However as you are resizing the images smaller after each read JPEG problems would be minimal, so that is all I'll say on the matter. So my recommended solution... convert -define jpeg:size=720x720 source.jpg -colorspace RGB \ \( +clone -thumbnail 420x420 -unsharp 0x0.7 \ -quality 75 -write th420_%im_version%.jpg +delete \) \ \( +clone -thumbnail 140x140 -unsharp 0x1.0 \ -quality 75 -write th140_%im_version%.jpg +delete \) \ null: Each parenthesis works on the read in image as if it was a completly separate "convert" command. You can in this way do as many convert type operations, generating as many thumbnails as you like, all from the one command and the one read of the original source image. PS: I consider a sharpening of 1.0 far too much, but it produces a very sharp looking thumbnail. 0.5 or 0.7 is probably plenty. OR is you really need to. Just replace "-size" with "-define jpeg:size=" in your command. Question: can I use your 'sample' image in IM examples? Anthony Thyssen ( System Programmer ) <[email protected]> ----------------------------------------------------------------------------- Instead of wasting my energy bemoaning what I didn't know, I should be using what I DID know to expand my own horizons. -- Robert Asprin "Myth-nomers and Im-pervections" ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
