Loading 32-bit PNG with datatypes

This forum is for general developer support questions.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Loading 32-bit PNG with datatypes

Post 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.
AmiHyperion
Posts: 28
Joined: Tue Aug 30, 2011 8:26 am

Re: Loading 32-bit PNG with datatypes

Post by AmiHyperion »

I attached via DataTypes, P96 and BitBlt.

Now the problem is that if i resize the window the image disappear
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: Loading 32-bit PNG with datatypes

Post 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.
Post Reply