blob: 208be2fbd932d1fa66baf2116c7a272a5154fee3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#! /bin/bash
# This script tests: pnmremap
# Also requires: pamdepth pamseq pamtopnm
alias pnmremap="${PBM_TESTPREFIX}pnmremap"
alias pamdepth="${PBM_BINPREFIX}pamdepth"
alias pamseq="${PBM_BINPREFIX}pamseq"
alias pamtopnm="${PBM_BINPREFIX}pamtopnm"
shopt -s expand_aliases
pamseq 3 5 -tupletype=RGB | pamtopnm \
> ${tmpdir}/palette
pamdepth 255 ${tmpdir}/palette > ${tmpdir}/palette255
# Test 1. Floyd-Steinberg
# This fails with older versions of Netpbm and x86-64.
# May also fail on other non-Intel architectures.
# v. 10.59.2
# x86-32: 2667816854 101482
# x86-64: 3602410851 101482
pnmremap -mapfile=${tmpdir}/palette -floyd -norandom \
testimg.ppm | cksum
rm ${tmpdir}/palette{,255}
|