Re: Simple API and associated alpha

Samuel Williams <[email protected]>
Newsgroups gmane.comp.graphics.png.devel
Message-ID <CAHkN8V8GhBiERo1ftJu_CjA5ngnuyhDP-YdzMshe3=1sjH4M8g@mail.gmail.com>
I manually jumped into a debugger and on the first invocation of
png_set_alpha_mode_fixed from png_image_read_direct, forced mode = 1.
Then, the test passed successfully.

So, it seems like the problem is when loading a PNG data stream, which
according to the documentation is un-associated alpha, via the simple
API which explains that the in-memory buffer is associated alpha, that
the expected transform is not taking place. Either that, or the
documentation is wrong, or  I'm misunderstanding how this should work.

Any ideas as to how to fix this would be appreciated.

Thanks
Samuel


On 6 September 2017 at 13:56, Samuel Williams
<[email protected]> wrote:
> Thanks Glenn.
>
> My understanding, according to the documentation, is that PNG data is
> never stored in a pre-multiplied format.
>
> Therefore, how does one provide an input image with associated alpha?
>
> My interpretation of the documentation is that the file on disk
> contains un-associated alpha, but that when loaded using the
> simplified API, will the contain associated alpha. It sounds like this
> interpretation is incorrect.
>
> If you have time, perhaps you could explain how one uses the
> simplified API to load a PNG data stream, such that the in-memory
> format is pre-multiplied.
>
> Thanks
> Samuel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.