This just keeps getting weirder.
I’ve got two images (attached), and I’m trying to composite them.? The bottom one is an 8-bit PNG, and the top is a 32-bit PNG with an alpha channel that includes a fully-transparent region.
I load both into surfaces with IMG_Load. So far, so good.? Then I create a new SDL_Surface to hold the output.? I blit Bottom onto it, and then Top, and save to PNG.? I expect to see the top image overlaid on the bottom one.
Instead, what I see depends on the output surface, but either way it’s wrong.? If I make the output surface 8-bit, the result is full of garbage, and if I make it 32-bit, the result is all black.
Any idea what’s going on here?? Running SDL2, HG revision 7309 (pretty darn recent) on Windows 7.
Mason
-------------- next part --------------
A non-text attachment was scrubbed…
Name: top.png
Type: image/png
Size: 2897 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130702/0838cf7e/attachment.png
-------------- next part --------------
A non-text attachment was scrubbed…
Name: bottom.png
Type: image/png
Size: 1949 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130702/0838cf7e/attachment-0001.png
Argh. Just noticed the Bottom image was the wrong size.? (Trying to simulate something a lot more complicated going on inside the program.)? Here’s a better version.________________________________
From: Mason Wheeler <@Mason_Wheeler>
To: sdl
Sent: Tuesday, July 2, 2013 1:27 PM
Subject: [SDL] More blitting trouble
This just keeps getting weirder.
I’ve got two images (attached), and I’m trying to composite them.? The bottom one is an 8-bit PNG, and the top is a 32-bit PNG with an alpha channel that includes a fully-transparent region.
I load both into surfaces with IMG_Load. So far, so good.? Then I create a new SDL_Surface to hold the output.? I blit Bottom onto it, and then Top, and save to PNG.? I expect to see the top image overlaid on the bottom one.
Instead, what I see depends on the output surface, but either way it’s wrong.? If I make the output surface 8-bit, the result is full of garbage, and if I make it 32-bit, the result is all black.
Any idea what’s going on here?? Running SDL2, HG revision 7309 (pretty darn recent) on Windows 7.
Mason
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: bottom.png
Type: image/png
Size: 1968 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130702/27968c73/attachment.png
Can you report a bug with a little test program?
Thanks!On Tue, Jul 2, 2013 at 1:34 PM, Mason Wheeler wrote:
Argh. Just noticed the Bottom image was the wrong size. (Trying to
simulate something a lot more complicated going on inside the program.)
Here’s a better version.
From: Mason Wheeler
To: sdl
Sent: Tuesday, July 2, 2013 1:27 PM
Subject: [SDL] More blitting trouble
This just keeps getting weirder.
I’ve got two images (attached), and I’m trying to composite them. The
bottom one is an 8-bit PNG, and the top is a 32-bit PNG with an alpha
channel that includes a fully-transparent region.
I load both into surfaces with IMG_Load. So far, so good. Then I create a
new SDL_Surface to hold the output. I blit Bottom onto it, and then Top,
and save to PNG. I expect to see the top image overlaid on the bottom one.
Instead, what I see depends on the output surface, but either way it’s
wrong. If I make the output surface 8-bit, the result is full of garbage,
and if I make it 32-bit, the result is all black.
Any idea what’s going on here? Running SDL2, HG revision 7309 (pretty
darn recent) on Windows 7.
Mason
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org