Opaque images: alpha off and resize [NOT A BUG]
Posted: 2013-09-23T08:01:31-07:00
This follows from viewtopic.php?f=1&t=24122
When an image has an alpha channel that is fully opaque, "-alpha off" before a resize shouldn't make a difference, but it does.
Here is a test case. Create a black and white image with alpha channel, but fully opaque:
Resize it two ways (with or without "-alpha off"):
What is the difference?
The difference is "1762.49 (0.0268939)", and occurs at the black/white boundary. Why is there a difference, and which version is correct?
EDIT: Sorry, forgot to say: tested in 6.8.6-10 on Windows 7.
When an image has an alpha channel that is fully opaque, "-alpha off" before a resize shouldn't make a difference, but it does.
Here is a test case. Create a black and white image with alpha channel, but fully opaque:
Code: Select all
convert ^
-size 32x32 xc:White ^
-gravity Center -background Black -extent 64x64 ^
-alpha on ^
st0.tga
Code: Select all
convert ^
st0.tga ^
-alpha off -resize 25%% ^
st1.png
convert ^
st0.tga ^
-resize 25%% ^
st2.png
Code: Select all
compare -metric RMSE st1.png st2.png NULL:
convert st1.png st2.png -compose Difference -composite -auto-level stDiff.png
EDIT: Sorry, forgot to say: tested in 6.8.6-10 on Windows 7.