Page 3 of 3

Re: Loading 32-bit PNG with datatypes

Posted: Fri Dec 13, 2013 5:31 pm
by chris
AmiHyperion wrote:So, what is the best way to load a 32 bit png (with alhpa) and display it on a window?
Depends what exactly you're trying to do. You can attach DataTypes objects to windows (or via bitmap.image), so if it's a pure display then that's likely the easiest method.

Re: Loading 32-bit PNG with datatypes

Posted: Sat Dec 14, 2013 8:50 pm
by AmiHyperion
I attached via DataTypes, P96 and BitBlt.

Now the problem is that if i resize the window the image disappear

Re: Loading 32-bit PNG with datatypes

Posted: Sun Dec 15, 2013 12:26 pm
by chris
AmiHyperion wrote:I attached via DataTypes, P96 and BitBlt.

Now the problem is that if i resize the window the image disappear
If you're blitting it to the window then the chances are resizing the window is wiping the contents.
You'll need to catch IDCMP_NEWSIZE events and re-blit it on resizing.

If you attach the object to the gadget list, it will handle this for you.