diff --git a/.travis.yml b/.travis.yml index ba90fe92..893b2c18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_install: - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo apt-add-repository --yes ppa:zoogie/sdl2-snapshots - sudo apt-get update -qq - - sudo apt-get install g++-4.8 libpng12-dev imagemagick libsdl2-dev + - sudo apt-get install g++-4.8 libpng12-dev imagemagick libsdl2-dev libimage-exiftool-perl env: matrix: diff --git a/src/Makefile b/src/Makefile index 8e5f767a..53ac5bb6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -116,6 +116,7 @@ test: flif test-interface ../tools/test-lossy.sh ./flif ../tools/kodim01.png ../tmp-test/kodim01-lossy.flif ../tmp-test/decoded_kodim01-lossy.png ../tools/test-roundtrip_anim.sh ./flif ../tools/endless_war.gif ../tmp-test/endless_war.flif ../tools/test-roundtrip_anim_framedir.sh ./flif ../tools/bouncing_ball_frames ../tmp-test/bouncing_ball.flif + ../tools/test-metadata.sh ./flif ../testFiles/sig05-014.png ../tmp-test/out-meta.flif ../tmp-test/out-meta.png flif.stats: $(FILES_H) $(FILES_CPP) flif.cpp diff --git a/testFiles/sig05-014.png b/testFiles/sig05-014.png new file mode 100644 index 00000000..41c01837 Binary files /dev/null and b/testFiles/sig05-014.png differ diff --git a/tools/test-metadata.sh b/tools/test-metadata.sh new file mode 100755 index 00000000..7ae92697 --- /dev/null +++ b/tools/test-metadata.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -ex + +FLIF=$1 +IN=$2 +OUTF=$3 +OUTP=$4 + +EXIFIN=../tmp-test/in-exif.xmp +EXIFOUT=../tmp-test/out-exif.xmp +EXIFTOOL_OPTIONS="-XMP:*" + +rm -f ${OUTF} ${OUTP} ${EXIFIN} ${EXIFOUT} +${FLIF} "${IN}" "${OUTF}" +${FLIF} -d ${OUTF} ${OUTP} +exiftool ${EXIFTOOL_OPTIONS} ${IN} -o ${EXIFIN} +exiftool ${EXIFTOOL_OPTIONS} ${OUTP} -o ${EXIFOUT} +diff ${EXIFIN} ${EXIFOUT} +