[magick-users] Converting to RGBA Question.
Anthony Thyssen
anthony at griffith.edu.au
Tue Jun 10 18:21:39 PDT 2008
Chris Howell on wrote...
| Hi All,
|
| I am still struggling to convert a JPG to rgba my command looks
| something like this
|
| convert demo.jpg -channel rgba -matte -transparent black demo.rgba
|
| Now my original file is 512x512 I would expect my output file to be 1M =
| 512 x 512 x 4 (rgba) however my file is 2M any ideas ?
|
-transparent implies -channel RGBA
However as I have said repeatally about JPEG!!!
JPEG losses information degrading images when saved.
Use some other format for intermediate images during processing.
Only use JPEG format, for the final image, not for further processing.
See IM Examples... http://imagemagick.org/Usage/formats/#jpg
As such your 'black' may not be a pure black!
Add a small 'fuzz' factor
convert demo.jpg -matte -fuzz 1% -transparent black demo.rgba
Even so. your image will probbaly not come out good due to the same
lossy behavior causing a random dither-like pattern to the added
transparency (it isn't a dither though).
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
The most menacing dwarf battle cry...
Today Is A Good Day For Someone Else To Die!
-- Terry Pratchett - ``Carpe Jugulum''
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list