[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Unexpected behavior from BLEND_RGBA_SUB
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Unexpected behavior from BLEND_RGBA_SUB
- From: "Yumiko Shirasagi" <shirasagi02@xxxxxxxxx>
- Date: Tue, 7 Oct 2008 15:18:27 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 07 Oct 2008 18:18:33 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=U3RY1Yxf/OPyV8vU9+7d3mZCahV6fjpDZEv9PE2auzc=; b=pendXGrhUzY7Ex2aJI06ffa4qdTfCH10o6eX/4in00PW5lraUPZAgp0QmXYtnhF9fE SnOPLDjgZvkqZ2zRDDg62z4ZNjM3ZUu53FlxFfho2BR/WuK2TPRLj/runk9iEAhIqmNL CVee5L9KIhu0ZzizWvOzT3r/thsKAqV/AszVI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=R+ei56W7bWG/f6uuhB+uJy9zXTTQXYeDfx6xibl5pkx+BUPztWrquwFoZA50l4IKAX W2qLr5zuglfZEYbnGgHk4a+vmWuikhMRHdZyUfp1OngrQRAYK77Q0XmTdyou+Wyrpa2r RNsJi50cQHGQKOVHUdeQa6ALEVdVV5kawwYlU=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello,
When I blit an image such as this (generated dynamically with PIL, and
saved here by pygame.image.save)-
http://xs432.xs.to/xs432/08412/mask808.png
to this screen, using the line "screen.blit(mask, (0, 0), None,
BLEND_RGBA_SUB)"-
http://xs432.xs.to/xs432/08412/screen136.png
it results in this-
http://xs432.xs.to/xs432/08411/tsukiyo3634.jpg
Is this what is supposed to happen? It seems to me that BLEND_RGBA_SUB
should respect the the alpha of the surface being blitted and avoid
subtracting the fully transparent gray pixels. Of course an alternate
solution is to get rid of those gray pixels, but I'm wondering whether
it is a bug in pygame, or if there is a solution that doesn't require
altering the way the surface is generated.