So basically what I want to do is resizing an 1-bit TIFF image with a geometry like 300x300 to create a PNG thumbnail. The problem that I'm facing now, is with IM-6.8.9-9 I can only get 8-bit sRGB 2c PNG images which kinda lost lots details in the image. I also tried using IM-6.6.8-1(not an official release version IM ftp?) at my work place and it's doing the conversion to sRGB 256c, the outcome image looks perfect.
I also tried separating the resizing and format conversion commands and the results are looking different than doing the commands in one line. Here I will give all the commands I played around with, but firstly the 1-bit TIFF I started with (I'll paste the identify info after each image):
https://drive.google.com/file/d/0B7qD3O ... sp=sharing
INFO: test_tiff TIFF 1500x2200 1500x2200+0+0 1-bit Bilevel Gray 172KB 0.000u 0:00.000
and I did:
Code: Select all
convert test_tiff -resize 300x300 thumb_test_tiff.png
INFO: thumb_test_tiff.png PNG 205x300 205x300+0+0 8-bit sRGB 2c 1.75KB 0.000u 0:00.000
if I do it in two steps:
Code: Select all
convert test_tiff -resize 300x300 separate_test_tiff
INFO: separate_test_tiff TIFF 205x300 205x300+0+0 1-bit Bilevel Gray 7.81KB 0.000u 0:00.000
Code: Select all
convert separate_test_tiff separate_test_tiff.png
INFO: separate_test_tiff.png PNG 205x300 205x300+0+0 8-bit sRGB 2c 4.89KB 0.000u 0:00.000
As you can see, the converted PNG images are having pretty small sizes.
thumb_test_tiff.png is like over-exposured and separate_test_tiff.png seems looking good but not good as doing resizing on PNG/JPEG images.
Here is a link to the one I resized from a PNG (thumb_resized_from_png.png):
https://drive.google.com/file/d/0B7qD3O ... sp=sharing
And the same commands I tried on jpeg (greyscale/RGB) images are all working fine.
===============================================================================
However, at my work place I have tried the same thing (notice it's IM 6.6.8-1)
Code: Select all
convert test_tiff_old -resize 300x300 thumb_test_tiff_old.png
INFO: thumb_test_tiff_old.png PNG 217x300 217x300+0+0 8-bit PseudoClass 256c 57.3KB 0.000u 0:00.000
If I separate the process commands I got poor PNG (2c and few KB on size) again as before.
===============================================================================
So, I'm wondering if it's expected to get poor PNG images now or I'm missing some cofigurations, or libs on my side. The flow is kinda understandable that scaling an image down might lose details (like texts became little dots), I can see this when I separate the resizing and format conversion, but doing the two together is kinda giving me an over-exposured PNG. I also tried an official version 6.6.8-10 that I downloaded from the IM ftp site and it's doing the same thing with 6.8.9-9.
For this to work correctly/ideally under IM 6.8.9-9, I need to put PNG8: (or PNG24:, PNG32:...) before the destination image so that the colors/pixels are kinda made up completely.
===============================================================================
Any ideas? Any way I could achieve the "pefect" conversion without explicitly using PNG8:(and others)?
Any help/comments would be appreciated