start fixing up test_thumbnail
since --interpolator no longer does anything
This commit is contained in:
parent
da43a4041f
commit
2996947b0d
5
TODO
5
TODO
@ -1,3 +1,8 @@
|
|||||||
|
- test_thumbnail.sh is failing ... 1000->999 makes a 998 image
|
||||||
|
|
||||||
|
- move 16->8 conversion to a separate pass? with so many constants, can't we
|
||||||
|
get an error for some mask sizes?
|
||||||
|
|
||||||
- try SEQ_UNBUFFERED on jpg source, get out of order error?
|
- try SEQ_UNBUFFERED on jpg source, get out of order error?
|
||||||
|
|
||||||
- could load pdf thumbnails?
|
- could load pdf thumbnails?
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# resize a 1000x1000 image to every size in [500,1000] with every interpolator
|
# resize a 1000x1000 image to every size in [100,1000], check for black
|
||||||
# and check for black lines
|
|
||||||
|
|
||||||
# see https://github.com/jcupitt/libvips/issues/131
|
# see https://github.com/jcupitt/libvips/issues/131
|
||||||
|
|
||||||
@ -23,39 +22,39 @@ break_threshold() {
|
|||||||
return $(echo "$diff > $threshold" | bc -l)
|
return $(echo "$diff > $threshold" | bc -l)
|
||||||
}
|
}
|
||||||
|
|
||||||
for interp in nearest bilinear bicubic lbb nohalo vsqbs; do
|
size=1000
|
||||||
size=1000
|
while [ $size -gt 99 ]; do
|
||||||
while [ $size -gt 499 ]; do
|
printf "testing size to $size ... "
|
||||||
printf "testing $interp, size to $size ... "
|
vipsthumbnail $tmp/t1.v -o $tmp/t2.v --size $size
|
||||||
vipsthumbnail $tmp/t1.v -o $tmp/t2.v --size $size --interpolator $interp
|
if [ $(vipsheader -f width $tmp/t2.v) -ne $size ]; then
|
||||||
if [ $(vipsheader -f width $tmp/t2.v) -ne $size ]; then
|
echo $tmp/t2.v failed -- bad size
|
||||||
echo failed -- bad size
|
echo output width is $(vipsheader -f width $tmp/t2.v)
|
||||||
echo output width is $(vipsheader -f width $tmp/t2.v)
|
exit
|
||||||
exit
|
fi
|
||||||
fi
|
if [ $(vipsheader -f height $tmp/t2.v) -ne $size ]; then
|
||||||
if [ $(vipsheader -f height $tmp/t2.v) -ne $size ]; then
|
echo $tmp/t2.v failed -- bad size
|
||||||
echo failed -- bad size
|
echo output height is $(vipsheader -f width $tmp/t2.v)
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
vips project $tmp/t2.v $tmp/cols.v $tmp/rows.v
|
|
||||||
|
|
||||||
min=$(vips min $tmp/cols.v)
|
vips project $tmp/t2.v $tmp/cols.v $tmp/rows.v
|
||||||
if break_threshold $min 0; then
|
|
||||||
echo failed -- has a black column
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
min=$(vips min $tmp/rows.v)
|
|
||||||
if break_threshold $min 0; then
|
|
||||||
echo failed -- has a black row
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ok
|
min=$(vips min $tmp/cols.v)
|
||||||
|
if break_threshold $min 0; then
|
||||||
|
echo $tmp/t2.v failed -- has a black column
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
size=$(($size-1))
|
min=$(vips min $tmp/rows.v)
|
||||||
done
|
if break_threshold $min 0; then
|
||||||
|
echo $tmp/t2.v failed -- has a black row
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ok
|
||||||
|
|
||||||
|
size=$(($size-1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user