trouble w/ SRCALPHA in 1.9.2-cp27

Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
bw
Reply | Threaded
Open this post in threaded view
|

trouble w/ SRCALPHA in 1.9.2-cp27

bw
Greetings,

Developers:

I've submitted issues #340 and #341.
https://bitbucket.org/pygame/pygame/issues/340/surfaceconvert-does-not-remove-the
https://bitbucket.org/pygame/pygame/issues/341/surfaceset_alpha-sets-the-srcalpha-flag

Actually it seems to impact everything from font rendering w/ a
background color, to rotozoom, to these tracked issues. Therefore, maybe
it'll be a one-tweak-fixes-all.

This problem has major impact on my current project (a gfx-intensive
shooter on Raspian), so I'd like to get a feel, if I may, for when the
next release may appear with the fix(es) in it?

Fellow coders:

In the meantime, I would consider a workaround. But I cannot find one.
If anyone is smarter than me, help would be appreciated. I need to
detect whether a surface has per-pixel alpha in order to apply the
proper transforms. In the past this was detectable by checking the flags
for the presence of SRCALPHA. It's the nature of these issues that this
is no longer reliable.

Thanks in advance.
bw
Reply | Threaded
Open this post in threaded view
|

Re: trouble w/ SRCALPHA in 1.9.2-cp27

bw
Before anyone wastes time on Font.render() I wish to take that off the
table. It's not impacted. That was a symptom of my Python.

The others are impacted: Surface.convert(), Surface.set_alpha(),
transform.rotozoom().


On 11/28/2017 3:56 PM, MrGumm wrote:

> Greetings,
>
> Developers:
>
> I've submitted issues #340 and #341.
> https://bitbucket.org/pygame/pygame/issues/340/surfaceconvert-does-not-remove-the 
>
> https://bitbucket.org/pygame/pygame/issues/341/surfaceset_alpha-sets-the-srcalpha-flag 
>
>
> Actually it seems to impact everything from font rendering w/ a
> background color, to rotozoom, to these tracked issues. Therefore,
> maybe it'll be a one-tweak-fixes-all.
>
> This problem has major impact on my current project (a gfx-intensive
> shooter on Raspian), so I'd like to get a feel, if I may, for when the
> next release may appear with the fix(es) in it?
>
> Fellow coders:
>
> In the meantime, I would consider a workaround. But I cannot find one.
> If anyone is smarter than me, help would be appreciated. I need to
> detect whether a surface has per-pixel alpha in order to apply the
> proper transforms. In the past this was detectable by checking the
> flags for the presence of SRCALPHA. It's the nature of these issues
> that this is no longer reliable.
>
> Thanks in advance.

Reply | Threaded
Open this post in threaded view
|

Re: trouble w/ SRCALPHA in 1.9.2-cp27

Thomas Kluyver
In reply to this post by bw
There's not a lot of work happening on pygame right now, so don't expect a new release any time soon. If you can find the fix for your issues, hopefully someone can look at a pull request.

Thomas

On 28 November 2017 at 23:56, MrGumm <[hidden email]> wrote:
Greetings,

Developers:

I've submitted issues #340 and #341.
https://bitbucket.org/pygame/pygame/issues/340/surfaceconvert-does-not-remove-the
https://bitbucket.org/pygame/pygame/issues/341/surfaceset_alpha-sets-the-srcalpha-flag

Actually it seems to impact everything from font rendering w/ a background color, to rotozoom, to these tracked issues. Therefore, maybe it'll be a one-tweak-fixes-all.

This problem has major impact on my current project (a gfx-intensive shooter on Raspian), so I'd like to get a feel, if I may, for when the next release may appear with the fix(es) in it?

Fellow coders:

In the meantime, I would consider a workaround. But I cannot find one. If anyone is smarter than me, help would be appreciated. I need to detect whether a surface has per-pixel alpha in order to apply the proper transforms. In the past this was detectable by checking the flags for the presence of SRCALPHA. It's the nature of these issues that this is no longer reliable.

Thanks in advance.

bw
Reply | Threaded
Open this post in threaded view
|

Re: trouble w/ SRCALPHA in 1.9.2-cp27

bw

Nooo... Say it ain't so!


On 11/29/2017 2:16 AM, Thomas Kluyver wrote:
There's not a lot of work happening on pygame right now, so don't expect a new release any time soon. If you can find the fix for your issues, hopefully someone can look at a pull request.

Thomas

On 28 November 2017 at 23:56, MrGumm <[hidden email]> wrote:
Greetings,

Developers:

I've submitted issues #340 and #341.
https://bitbucket.org/pygame/pygame/issues/340/surfaceconvert-does-not-remove-the
https://bitbucket.org/pygame/pygame/issues/341/surfaceset_alpha-sets-the-srcalpha-flag

Actually it seems to impact everything from font rendering w/ a background color, to rotozoom, to these tracked issues. Therefore, maybe it'll be a one-tweak-fixes-all.

This problem has major impact on my current project (a gfx-intensive shooter on Raspian), so I'd like to get a feel, if I may, for when the next release may appear with the fix(es) in it?

Fellow coders:

In the meantime, I would consider a workaround. But I cannot find one. If anyone is smarter than me, help would be appreciated. I need to detect whether a surface has per-pixel alpha in order to apply the proper transforms. In the past this was detectable by checking the flags for the presence of SRCALPHA. It's the nature of these issues that this is no longer reliable.

Thanks in advance.


Reply | Threaded
Open this post in threaded view
|

Re: trouble w/ SRCALPHA in 1.9.2-cp27

Thomas Kluyver
I'm not saying it's permanently dead. Existing maintainers may find more time to work on it again. New people might turn up and help to push it forwards. It's happened before - I successfully agitated for the 1.9.2 and 1.9.3 releases to happen, several years after 1.9.1.

Yesterday, I got the tests working on Travis CI again, so people can submit pull requests and expect the tests to pass. Here are some things people could do:

1. There are several pull requests awaiting review from someone who knows C and/or the Python C API: https://github.com/pygame/pygame/pulls

2. There are about 100 open issues: https://github.com/pygame/pygame/issues . Obviously if you can fix one, that's great, but if you can suggest how it might be fixed, or what the underlying problem might be, that could make it possible for someone else to fix it.

3. Triage! Check if you can reproduce a bug and supply more details. Issue #340 on Github is a good example: it could be affecting almost all Mac users, or only a few in specific situations. Does it depend on how you installed pygame? Your version of Mac OS? Is it already fixed in the latest pygame release, or in master? It needs someone with a Mac to investigate it.

4. If you're more into web programming or databases, the pygame.org website could use some work, at https://github.com/pygame/pygameweb . For starters, I've opened several issues about setting up a local site to test changes on: I found this process tricky, and its a barrier to people contributing to the site itself.

Thomas

On 30 November 2017 at 00:03, MrGumm <[hidden email]> wrote:

Nooo... Say it ain't so!


On 11/29/2017 2:16 AM, Thomas Kluyver wrote:
There's not a lot of work happening on pygame right now, so don't expect a new release any time soon. If you can find the fix for your issues, hopefully someone can look at a pull request.

Thomas

On 28 November 2017 at 23:56, MrGumm <[hidden email]> wrote:
Greetings,

Developers:

I've submitted issues #340 and #341.
https://bitbucket.org/pygame/pygame/issues/340/surfaceconvert-does-not-remove-the
https://bitbucket.org/pygame/pygame/issues/341/surfaceset_alpha-sets-the-srcalpha-flag

Actually it seems to impact everything from font rendering w/ a background color, to rotozoom, to these tracked issues. Therefore, maybe it'll be a one-tweak-fixes-all.

This problem has major impact on my current project (a gfx-intensive shooter on Raspian), so I'd like to get a feel, if I may, for when the next release may appear with the fix(es) in it?

Fellow coders:

In the meantime, I would consider a workaround. But I cannot find one. If anyone is smarter than me, help would be appreciated. I need to detect whether a surface has per-pixel alpha in order to apply the proper transforms. In the past this was detectable by checking the flags for the presence of SRCALPHA. It's the nature of these issues that this is no longer reliable.

Thanks in advance.



bw
Reply | Threaded
Open this post in threaded view
|

Re: trouble w/ SRCALPHA in 1.9.2-cp27

bw
In reply to this post by bw

Here's a workaround for anyone in the same bind, i.e. where the routine handles generic surfaces and therefore needs to inspect them in order to apply the appropriate alpha effect.

1. save the surface alpha
2. set the surface alpha to None
3. test the surface for SRCALPHA
4. if SRCALPHA, do blending for per-pixel alpha
5. restore the surface alpha


On 11/29/2017 4:03 PM, MrGumm wrote:

Nooo... Say it ain't so!


On 11/29/2017 2:16 AM, Thomas Kluyver wrote:
There's not a lot of work happening on pygame right now, so don't expect a new release any time soon. If you can find the fix for your issues, hopefully someone can look at a pull request.

Thomas

On 28 November 2017 at 23:56, MrGumm <[hidden email]> wrote:
Greetings,

Developers:

I've submitted issues #340 and #341.
https://bitbucket.org/pygame/pygame/issues/340/surfaceconvert-does-not-remove-the
https://bitbucket.org/pygame/pygame/issues/341/surfaceset_alpha-sets-the-srcalpha-flag

Actually it seems to impact everything from font rendering w/ a background color, to rotozoom, to these tracked issues. Therefore, maybe it'll be a one-tweak-fixes-all.

This problem has major impact on my current project (a gfx-intensive shooter on Raspian), so I'd like to get a feel, if I may, for when the next release may appear with the fix(es) in it?

Fellow coders:

In the meantime, I would consider a workaround. But I cannot find one. If anyone is smarter than me, help would be appreciated. I need to detect whether a surface has per-pixel alpha in order to apply the proper transforms. In the past this was detectable by checking the flags for the presence of SRCALPHA. It's the nature of these issues that this is no longer reliable.

Thanks in advance.