Page 1 of 1

Problem with #ATTRTRANSPARENTCOLOR

Posted: Fri Oct 25, 2019 4:12 pm
by PEB
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).

Re: Problem with #ATTRTRANSPARENTCOLOR

Posted: Fri Oct 25, 2019 10:02 pm
by airsoftsoftwair
Thanks, will be fixed.

Re: Problem with #ATTRTRANSPARENTCOLOR

Posted: Sun Dec 08, 2019 3:41 pm
by airsoftsoftwair
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

Posted: Mon Dec 09, 2019 12:13 am
by PEB
Sounds good.

The thing that I'm more interested in, though, is that #ATTRTRANSPARENTCOLOR actually returns the transparent color, not always #NOTRANSPARENCY.

Re: Problem with #ATTRTRANSPARENTCOLOR

Posted: Fri Dec 13, 2019 4:10 pm
by airsoftsoftwair
PEB wrote: Mon Dec 09, 2019 12:13 am The thing that I'm more interested in, though, is that #ATTRTRANSPARENTCOLOR actually returns the transparent color, not always #NOTRANSPARENCY.
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

Posted: Sat Dec 14, 2019 10:18 pm
by PEB
Sounds good.

Thanks!

Re: Problem with #ATTRTRANSPARENTCOLOR

Posted: Sun Feb 28, 2021 12:04 am
by airsoftsoftwair

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