how i can to know if an APNG animation have or not alphachannel, as i can do it with a single picture?
"isanim" don´t tell me nothing about this case
Apng alpha channel
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Apng alpha channel
Have you tried to call IsPicture() on the APNG? Maybe it works because APNG is actually just a hacked PNG file Otherwise, do it like this:
This should be quite efficient because "FromDisk" is set to TRUE, i.e. no frames are actually loaded by LoadAnim().
Code: Select all
LoadAnim(1, "test.apng", {FromDisk = True})
havealpha = GetAttribute(#ANIM, 1, #ATTRHASALPHA)
FreeAnim(1)
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Apng alpha channel
work nice, but i wish a table with is anim instruction as ispicture have (if is possible)
another thing, i´m using brushes as sprites with a width of the sheet > of 30000 pixels, and displaybrushpart doesn´t work with them (only display the sprite placed in first position here), do you knows what´s the size limit in pixels of an image?
another thing, i´m using brushes as sprites with a width of the sheet > of 30000 pixels, and displaybrushpart doesn´t work with them (only display the sprite placed in first position here), do you knows what´s the size limit in pixels of an image?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Apng alpha channel
That's an OS limit. I think OS4 has a bitmap width limit of 16384 pixels or 32768 pixels. You can circumvent this by using the USEWPA argument, but then drawing will be a bit slower.