Page 1 of 1

round corner - output too large

Posted: 2010-04-28T07:37:35-07:00
by jcr
Hello,

I am using ImageMagick 6.6 on a centos 5.4 box.
My $src image is a JPEG 378x252 378x252+0+0 DirectClass 8-bit 21.0508kb (from identify)

the command is:

Code: Select all

$command = "/websites/libraries/im_6_6/bin/convert $src -rotate $rotate -gamma $gamma -resize 240X350^ -gravity center -extent 240x350 \
                     \( +clone -quality 0  -threshold -1 -draw 'fill black polygon 0,0 0,15 15,0 fill white circle 15,15 15,0' \( +clone -flop \) \
                    -compose Multiply -composite \) +matte -compose CopyOpacity -composite -quality 0 -strip $dest";
The end result is visually what I need with round corners.

The problem is that when I identify the output, I am getting:
PNG 240x350 240x350+0+0 DirectClass 8-bit 183.986kb
and the weight of the image is now 183 versus 21 before.

how can I make that image lighter?

Thanks!

Re: round corner - output too large

Posted: 2010-04-28T08:04:04-07:00
by snibgo
If the image is a photograph, it will compress better in JPEG than PNG, so the PNG version will be larger.

JPEG doesn't support transparency. If you want a smaller JPEG output, you could flatten it against a solid colour, which would fill in the corners.

Re: round corner - output too large

Posted: 2010-04-28T09:21:45-07:00
by fmw42