summaryrefslogtreecommitdiff
path: root/utilities/tests/icc-transform.tap
blob: 934d381b75cba8ca63d7b27ffa4a8f050942c1ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# -*- shell-script -*-
# Copyright (C) 2004-2012 GraphicsMagick Group
# Test ICC Transforms
. ./common.shi
. ${top_srcdir}/utilities/tests/common.sh

# Number of tests we plan to execute
test_plan_fn 3

ORIGINAL_PROFILE=sunrise.icc
IMAGE_OUTPUT=ICCTransform_out.miff

rm -f ${ORIGINAL_PROFILE}
rm -f ${IMAGE_OUTPUT}
test_command_fn 'Extract ICC profile' ${GM} convert ${SUNRISE_MIFF} ${ORIGINAL_PROFILE}
test_command_fn 'Apply ICC profile and then reverse it' -F LCMS ${GM} convert ${SUNRISE_MIFF} -profile ${BETARGB_PROFILE} -profile ${ORIGINAL_PROFILE} ${IMAGE_OUTPUT}
test_command_fn 'Verify results' ${GM} compare -maximum-error 0.004 -metric MAE ${SUNRISE_MIFF} ${IMAGE_OUTPUT}
rm -f ${ORIGINAL_PROFILE}
rm -f ${IMAGE_OUTPUT}
: