Problem with #ATTRTRANSPARENTCOLOR

Report any Hollywood bugs here
Post Reply
PEB
Posts: 567
Joined: Sun Feb 21, 2010 1:28 am

Problem with #ATTRTRANSPARENTCOLOR

Post 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).
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with #ATTRTRANSPARENTCOLOR

Post by airsoftsoftwair »

Thanks, will be fixed.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with #ATTRTRANSPARENTCOLOR

Post 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
PEB
Posts: 567
Joined: Sun Feb 21, 2010 1:28 am

Re: Problem with #ATTRTRANSPARENTCOLOR

Post by PEB »

Sounds good.

The thing that I'm more interested in, though, is that #ATTRTRANSPARENTCOLOR actually returns the transparent color, not always #NOTRANSPARENCY.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with #ATTRTRANSPARENTCOLOR

Post 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.
PEB
Posts: 567
Joined: Sun Feb 21, 2010 1:28 am

Re: Problem with #ATTRTRANSPARENTCOLOR

Post by PEB »

Sounds good.

Thanks!
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with #ATTRTRANSPARENTCOLOR

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