Problem with #ATTRTRANSPARENTCOLOR
Problem with #ATTRTRANSPARENTCOLOR
If a GIF image or animation is loaded with {LoadTransparency=True}, the transparency is applied correctly when the brush or animation is displayed. However, if the transparency color is then checked using #ATTRTRANSPARENTCOLOR in GetAttribute() with either #BRUSH or #ANIM, it never seems to return anything but -1 (not even #NOTRANSPARENCY).
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problem with #ATTRTRANSPARENTCOLOR
Thanks, will be fixed.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problem with #ATTRTRANSPARENTCOLOR
So -1 is actually #NOTRANSPARENCY but as a signed value instead of unsigned which it should be. Fixed now.
Code: Select all
- Fix: #ATTRTRANSPARENTCOLOR returned #NOTRANSPARENCY as a signed value whereas it should be unsigned
Re: Problem with #ATTRTRANSPARENTCOLOR
Sounds good.
The thing that I'm more interested in, though, is that #ATTRTRANSPARENTCOLOR actually returns the transparent color, not always #NOTRANSPARENCY.
The thing that I'm more interested in, though, is that #ATTRTRANSPARENTCOLOR actually returns the transparent color, not always #NOTRANSPARENCY.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problem with #ATTRTRANSPARENTCOLOR
This has been disabled on purpose because when using "LoadTransparency" the transparency is pen-based instead of color-based. I'm planning to add some functions to deal with palette-based images, however, and then I'll add a new attribute named #ATTRTRANSPARENTPEN.
Re: Problem with #ATTRTRANSPARENTCOLOR
Sounds good.
Thanks!
Thanks!
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problem with #ATTRTRANSPARENTCOLOR
Code: Select all
- New: GetAttribute() now supports #ATTRPALETTE, #ATTRDEPTH, and #ATTRTRANSPARENTPEN for types #DISPLAY,
#BRUSH, #BGPIC, #SPRITE, #ANIM, #TEXTOBJECT, and #LAYER; this is mainly useful if the source objects
have a palette; note that when used with #ANIM or #SPRITE (or anim layers) you also need to pass a frame
parameter as each frame could have its own palette and transparency setting; for anims loaded from disk
you can only query the data from the last frame loaded