Skip to content

Instantly share code, notes, and snippets.

@katoy
Last active December 10, 2015 01:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katoy/4361493 to your computer and use it in GitHub Desktop.
Save katoy/4361493 to your computer and use it in GitHub Desktop.
Sample for ImageMagick.
/bin/sh
# convert --version
# Version: ImageMagick 6.8.0-7 2012-12-05 Q16 http://www.imagemagick.org
# See http://www.imagemagick.org/Usage/compare/
\rm -f test_*.gif
\rm -f *.jpg
compare bag_frame1.gif bag_frame2.gif test_compare.gif
compare bag_frame1.gif bag_frame2.gif \
-compose Src test_compare_src.gif
compare bag_frame1.gif bag_frame2.gif \
-compose Src -highlight-color White -lowlight-color Black test_compare_src_color.gif
composite bag_frame1.gif bag_frame2.gif \
-compose difference test_difference_composite.gif
convert bag_frame1.gif bag_frame2.gif \
-compose difference -composite -colorspace Gray test_difference_convert_gray.gif
convert bag_frame1.gif bag_frame2.gif \
-compose difference -composite -separate -evaluate-sequence add test_difference_convert_add.gif
# -----------------
convert bag_frame1.gif bag_frame1.jpg
composite bag_frame1.gif bag_frame1.jpg \
-compose difference test_difference_jpeg.gif
convert test_difference_jpeg.gif \
-auto-level test_difference_convert_autolevel.gif
# -----------------
convert -delay 50 bag_frame1.gif bag_frame2.gif -loop 0 test_flicker_cmp.gif
# -----------------
@katoy
Copy link
Author

katoy commented Dec 22, 2012

ImageMagick をつかって画像の差分を得る方法の比較。

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment