Animation issue

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
Dragon31337
Posts: 3
Joined: 2010-02-26T16:33:19-07:00
Authentication code: 8675308

Animation issue

Post by Dragon31337 »

I have two huge PNG files (i.e. screenshots). They are close to each-other but different. I want to create an animation where the same part of this file changing forward and back showing the difference.
I've cut the same pieces from both images:
convert screen1.png -crop 172x87+694+538 screen1_part.png
convert screen2.png -crop 172x87+694+538 screen2_part.png

Now I want to create an animation with these two images:
convert -background black -delay 50 +dither screen1_part.png screen2_part.png anim_diff.gif

The problem is that images I've got has the same resolution as original screens had. I can't get why.
OK, it is even nice (but unexpected), it shows where these parts were taken from. But the color of the border differs between frames and distracts user. I believe this is just first color from color map. Is there any option to make it same color? Or at least get rid of this border.

I alos tried to annotate the image but it does not work
convert screen1_part.png -stroke none-fill white -annotate +20+20 "Note" screen1_part_anno.png


BTW: I hope these days image magick uses common color map for both frames. So there is not need to append images to each other and generated 256 unique colors as a map.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animation issue

Post by fmw42 »

after cropping add +repage

see note about virtual canvas at http://www.imagemagick.org/Usage/crop/#crop_repage

The color issue may go away after fixing the crop.
convert screen1_part.png -stroke none-fill white -annotate +20+20 "Note" screen1_part_anno.png
you need a space between none and -fill
Dragon31337
Posts: 3
Joined: 2010-02-26T16:33:19-07:00
Authentication code: 8675308

Re: Animation issue

Post by Dragon31337 »

fmw42 wrote:after cropping add +repage
convert screen1_part.png -stroke none-fill white -annotate +20+20 "Note" screen1_part_anno.png
you need a space between none and -fill
I had that space. Probably it took this coordinates in original screen dimensions.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Animation issue

Post by Bonzo »

I would use:

Code: Select all

convert screen1_part.png -fill white -pointsize 20 -gravity south -annotate +20+20 "Note" screen1_part_anno.png
Post Reply