[Gimp-user] Strange behaviour with ALPHA in GIMP 2.8.10



Hello All,

I'm having an issue with how alpha is treated by Gimp (and other programs). I
first noticed this issue when I noticed that frames encoded into video look
markedly different than frames "flattened" by gimp. I figured out how to
reproduce images as they appear in the video (what I want), but I can't figure
out why/how it works and where the difference is caused.

I would normally do the following to flatten an image (on a black background)

Method A
1. Load store-0056628.png (attached as Orig)
2. Set the background colour to black
3. Do Image -> Flatten Image

Method A results in image attached as A, which is far darker in appearance than
it would be if encoded in a video file (using avconv).

I can reproduce the way the frame looks in video in Gimp by doing the following:

Method B
1. Load store-0056628.png
2. Go to Channels and unselect R, G, B channels (leaving only alpha selected)
3. Edit -> Fill with BG Colour

Method B results in image attached as B and is a very different image with much
higher luminosity, and matches (identically as far as I can tell) the video
encoded results.

Filling the alpha channel with a solid colour does not behave as I expect, as
whether I fill with black or white makes no difference; the image is rendered
with a black background in either case (I expect because the pixels with alpha=0
also have R,G,B=0). Black should make the whole image invisible, and white
should make the whole image opaque.

Image viewers (such as Feh) and even using imagemagick to flatten the image lead
to the same results as Method A.

What is Method B actually doing compared to Method A? Consistency with video is
the goal, but it would be nice if I could figure out what is going on so I can
use other programs (like Imagemagick) to do Method B. I presume I could use a
video encoder to read PNGs and output PNGs, but that seems clunky.

Thanks,
B.


Attachments:
* http://www.gimpusers.com/system/attachments/290/original/store-0056628.png
* http://www.gimpusers.com/system/attachments/291/original/store-0056628-flatten.png
* http://www.gimpusers.com/system/attachments/292/original/store-0056628-fillAlpha.png

-- 
BDRB (via www.gimpusers.com/forums)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]