round corner - output too large

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jcr

round corner - output too large

Post 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!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: round corner - output too large

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: round corner - output too large

Post by fmw42 »

Post Reply