optimizeplus - convert: images are not the same size

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
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

optimizeplus - convert: images are not the same size

Post by agriz »

Code: Select all

convert image_1.png image_2.png image_3.png \( -size 300x300 xc:none  -box white -gravity south -draw "text 0,0 'text'" \) -set delay 150 -layers OptimizePlus -loop 1 finalized.gif

-- all images are 300x300
If i use OptimizePlus it throws the error. [ convert: images are not the same size @ error/layer.c/OptimizeLayerFrames/968]
If i use Optimize it works without any error.

OptimizePlus produces big image size
Optimize produces small image size.

How to keep the image size low?
Can i add -quality 60 anywhere in the images?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: optimizeplus - convert: images are not the same size

Post by fmw42 »

I do not see any IM command -box at http://www.imagemagick.org/script/comma ... ptions.php.

See http://www.imagemagick.org/Usage/anim_opt/

As I keep asking you, please always provide your IM version and platform!!!!!
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: optimizeplus - convert: images are not the same size

Post by agriz »

IM 7.0.2

http://www.imagemagick.org/Usage/draw/#text
-box text-undercolor fill color for font bounding box

I just used that from here.
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: optimizeplus - convert: images are not the same size

Post by agriz »

Image

I extracted the frames of this gif and

Code: Select all


convert \( frame-0.png \) \( frmae-1.png \)  -size 400x250 xc:none  -box white  -pointsize 22 -gravity south -draw "text 0,0 'text'"  -set delay 30 -loop 0 -layers OptimizePlus output.gif

images are not the same size`frame-0.png' @ error/layer.c/OptimizeLayerFrames/968. )
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: optimizeplus - convert: images are not the same size

Post by fmw42 »

See http://imagemagick.org/script/porting.php#cli. -box is deprecated (but still works in IM 7) and is replaced by -undercolor.

I think you really want this command.

Code: Select all

convert cat.gif -coalesce -layers OptimizePlus \
null: \
-size 400x250 xc:none -undercolor white -pointsize 22 -gravity south \
-draw "text 0,0 'text'" -set delay 30 -loop 0 -layers composite \
-layers optimize cat2.gif
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: optimizeplus - convert: images are not the same size

Post by agriz »

This one adds text all the time visible. I want the text to be the very last frame showing details
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: optimizeplus - convert: images are not the same size

Post by fmw42 »

try this

Code: Select all

convert cat.gif -coalesce \
\( -clone -1 \
	-size 400x250 xc:none -undercolor white \
	-pointsize 22 -gravity south -draw "text 0,0 'text'" \
	-compose over -composite \) \
+swap +delete \
-set delay 30 -loop 0 \
-layers OptimizePlus -layers Optimize \
cat2.gif
Post Reply