Fred,
The verbose output for my image is below. From what i know of this
image is that it is a '1 bit transparency image'.
But still i don't understand why the resize transformation changes
other parameters than the size.
Also i noticed that after the transformation (a resize with the exact
same dimension as the orginal one), the image is
much larger:
> convert wbtest.png -resize 64x64 wbtestt.png
> ls -l wbtest.png wbtestt.png
-rw-r--r--@ 1 stephane staff 661 Sep 22 13:41 wbtest.png
-rw-r--r--@ 1 stephane staff 1520 Sep 22 17:43 wbtestt.png
> identify -verbose wbtest.png
Image: wbtest.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 64x64+0+0
Resolution: 72x72
Print size: 0.888889x0.888889
Units: Undefined
Type: PaletteMatte
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 1-bit
Channel statistics:
red:
min: 0 (0)
max: 255 (1)
mean: 72.2864 (0.283476)
standard deviation: 114.324 (0.448329)
kurtosis: -1.08971
skewness: 0.951705
green:
min: 0 (0)
max: 202 (0.792157)
mean: 57.261 (0.224553)
standard deviation: 90.5602 (0.355138)
kurtosis: -1.08976
skewness: 0.951685
blue:
min: 0 (0)
max: 222 (0.870588)
mean: 62.9297 (0.246783)
standard deviation: 99.5258 (0.390297)
kurtosis: -1.0897
skewness: 0.951706
alpha:
min: 0 (0)
max: 255 (1)
mean: 72.9016 (0.285889)
standard deviation: 115.218 (0.451837)
kurtosis: -1.10179
skewness: -0.947738
Image statistics:
OverAll:
min: 0 (0)
max: 255 (1)
mean: 93.6439 (0.367231)
standard deviation: 117.259 (0.459841)
kurtosis: -1.71931
skewness: 0.48071
Alpha: none #00000000
Histogram:
2925: ( 0, 0, 0, 0) #00000000 none
974: (255,202,222,255) #FFCADE rgba(255,202,222,1)
27: (254,201,221,255) #FEC9DD rgba(254,201,221,1)
24: (253,200,220,255) #FDC8DC rgba(253,200,220,1)
20: (252,200,219,255) #FCC8DB rgba(252,200,219,1)
13: (251,199,219,255) #FBC7DB rgba(251,199,219,1)
8: (249,197,217,255) #F9C5D9 rgba(249,197,217,1)
7: (250,198,218,255) #FAC6DA rgba(250,198,218,1)
6: (244,193,212,255) #F4C1D4 rgba(244,193,212,1)
6: (248,196,216,255) #F8C4D8 rgba(248,196,216,1)
4: (216,171,188,255) #D8ABBC rgba(216,171,188,1)
4: (237,188,206,255) #EDBCCE rgba(237,188,206,1)
4: (238,189,207,255) #EEBDCF rgba(238,189,207,1)
4: (240,190,209,255) #F0BED1 rgba(240,190,209,1)
3: (214,170,186,255) #D6AABA rgba(214,170,186,1)
3: (223,177,194,255) #DFB1C2 rgba(223,177,194,1)
3: (232,184,202,255) #E8B8CA rgba(232,184,202,1)
3: (235,186,205,255) #EBBACD rgba(235,186,205,1)
3: (239,189,208,255) #EFBDD0 rgba(239,189,208,1)
3: (241,191,210,255) #F1BFD2 rgba(241,191,210,1)
3: (243,192,212,255) #F3C0D4 rgba(243,192,212,1)
3: (245,194,213,255) #F5C2D5 rgba(245,194,213,1)
3: (246,195,214,255) #F6C3D6 rgba(246,195,214,1)
3: (247,196,215,255) #F7C4D7 rgba(247,196,215,1)
2: (213,169,185,255) #D5A9B9 rgba(213,169,185,1)
2: (217,172,189,255) #D9ACBD rgba(217,172,189,1)
2: (219,173,191,255) #DBADBF rgba(219,173,191,1)
2: (220,174,192,255) #DCAEC0 rgba(220,174,192,1)
2: (222,176,193,255) #DEB0C1 rgba(222,176,193,1)
2: (233,185,203,255) #E9B9CB rgba(233,185,203,1)
2: (234,185,204,255) #EAB9CC rgba(234,185,204,1)
2: (236,187,205,255) #ECBBCD rgba(236,187,205,1)
2: (252,200,220,255) #FCC8DC rgba(252,200,220,1)
1: (141,112,123,255) #8D707B rgba(141,112,123,1)
1: (188,150,164,255) #BC96A4 rgba(188,150,164,1)
1: (201,159,175,255) #C99FAF rgba(201,159,175,1)
1: (203,161,177,255) #CBA1B1 rgba(203,161,177,1)
1: (211,167,184,255) #D3A7B8 rgba(211,167,184,1)
1: (212,168,185,255) #D4A8B9 rgba(212,168,185,1)
1: (218,172,189,255) #DAACBD rgba(218,172,189,1)
1: (218,173,189,255) #DAADBD rgba(218,173,189,1)
1: (218,173,190,255) #DAADBE rgba(218,173,190,1)
1: (220,175,192,255) #DCAFC0 rgba(220,175,192,1)
1: (225,178,196,255) #E1B2C4 rgba(225,178,196,1)
1: (227,180,198,255) #E3B4C6 rgba(227,180,198,1)
1: (228,181,198,255) #E4B5C6 rgba(228,181,198,1)
1: (229,181,199,255) #E5B5C7 rgba(229,181,199,1)
1: (230,182,200,255) #E6B6C8 rgba(230,182,200,1)
1: (231,183,201,255) #E7B7C9 rgba(231,183,201,1)
1: (236,187,206,255) #ECBBCE rgba(236,187,206,1)
1: (242,192,211,255) #F2C0D3 rgba(242,192,211,1)
1: (244,193,213,255) #F4C1D5 rgba(244,193,213,1)
1: (248,197,216,255) #F8C5D8 rgba(248,197,216,1)
1: (253,201,220,255) #FDC9DC rgba(253,201,220,1)
1: (254,202,221,255) #FECADD rgba(254,202,221,1)
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Page geometry: 64x64+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
create-date: 2009-09-22T13:41:42-07:00
modify-date: 2009-09-22T13:41:42-07:00
signature:
4a28922a9b6af6abb7f62b21daae84bd3352c1e8b289142d88e35de3d424671e
Artifacts:
verbose: true
Tainted: False
Filesize: 661b
Number pixels: 4kb
Version: ImageMagick 6.5.2-9 2009-06-23 Q16 http://
www.imagemagick.org
Should i post my image -- i thought we could not do that on the forum?
Thanks a lot!
S.
On Sep 22, 2009, at 5:16 PM, Fred Weinhaus wrote:
> Hi Stephane,
>
>
> First, the proper IM 6 syntax is:
>
> convert wbtest.png -resize 64x64 out.png
>
> see http://www.imagemagick.org/Usage/basics/#cmdline
>
> but probably won't make any difference.
>
> But the main thing is to see what you have to start. So get a
> verbose info on your input
>
> identify -verbose wbtest.png
>
> you will probably find that it has some transparency in it to start
> with, perhaps the white is set to opaque white as
> rgb(255,255,255,1), or there is an opaque alpha channel or some not
> fully opaque alpha channel on to make some color transparent. Thus
> the opaque colors get coded with alpha=1 (opaque as opposed to the
> any non-opaque colors that would have alpha<1 or even 0 for fully
> transparent.
>
> you will likely find that your image is not what you think it is to
> start with.
>
> Send that back or post on the forum. Or just post a link to your
> image so that I or others can check it.
>
> Fred
>
>
>> Fred,
>>
>> Thanks for your reply. The command i am using is:
>>
>> > convert -resize 64x64 wbtest.png out.png
>>
>> # Get metadata for original image:
>>> identify -verbose wbtest.png > /tmp/wb
>> # Get metadata for transformed image
>>> identify -verbose out.png > /tmp/wb
>>
>> # Do a diff:
>>> diff wb wbt
>> 1c1
>> < Image: wbtest.png
>> ---
>>> Image: out.png
>> 113c113
>> < Background color: white
>> ---
>>> Background color: rgba(1,1,1,1)
>> ...
>>
>>
>>
>> Now, i tried with your suggestion but the background shows up as
>> black (altough Background color says white)
>>
>>> convert -resize 64x64 wbtest.png -alpha off out.png; identify -
>>> verbose out.png | grep Background
>> Background color: white
>>
>>
>> All i want is keep the image as it was before the resizing.
>>
>>
>> Any ideas?
>>
>> S.
>>
>> On Sep 22, 2009, at 3:10 PM, Fred Weinhaus wrote:
>>
>>>
>>> What is your exact command? You have probably done something to
>>> either add transparent colors or turn on the alpha channel
>>> everywhere. If you want to turn it off everywhere, then at the end
>>> of
>>> your command line just before the output image add -alpha off (or
>>> +matte).
>>>
>>>
>>>
>>> I am doing a simple resize operation on an image with a white
>>>> backgound, and when i look at the result, i see that the background
>>>> has changed:
>>>> < Background color: white
>>>> ---
>>>>> Background color: rgba(1,1,1,1)
>>>>
>>>>
>>>> Is that intended? Is there any option i could turn on to prevent
>>>> that.
>>>> That seems to not give the expected result on IE6?
>>>>
>>>> Thanks,
>>>>
>>>> S.
>>> _______________________________________________
>>> Magick-users mailing list
>>> [email protected]
>>> http://studio.imagemagick.org/mailman/listinfo/magick-users
>
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users