question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Have you gotten setTransparent(Number color) to work?

Issue Analytics

  • State:open
  • Created 12 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
memaligncommented, Jan 2, 2022

Note that there are TWO places that need to be changed from: var index = i / 3; To var index = Math.floor(i / 3);

  • In the code g-regor posted above
  • In the implementation of findClosest

Without these two fixes the wrong color is chosen as the transparency color.

(I discovered this when debugging why 0x000000 worked as a transparency color but 0xFFFFFF did not)

1reaction
Pl4n3commented, Jan 13, 2013

Also, to run, line 363 must use floor function here:

var index/int/ = Math.floor(i / 3);

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vcl.Graphics.TGraphic.SetTransparent - Embarcadero DocWiki
SetTransparent specifies if a graphic should be drawn transparently. See Also. SupportsPartialTransparency · Transparent · GetTransparent. Retrieved from "http ...
Read more >
SetTransparent Method
Tells FreeImage if it should make use of the transparency table or the alpha channel that may accompany a bitmap. Namespace: FreeImageAPI
Read more >
SetTransparency Method (GdPictureImaging)
SetTransparency Method (GdPictureImaging) ... Adds transparency to a GdPicture image or into an area of a GdPicture image defined by SetROI() method. Syntax....
Read more >
setTransparent · Issue #6 · benjaminadk/gif-encoder-2 - GitHub
I just found the solution. class GIFEncoder extends EventEmitter { constructor(width, height, algorithm = 'neuquant', useOptimizer = false, ...
Read more >
SetTransparency Method—ArcGIS Pro
SetTransparency Method. In This Topic. Syntax; Exceptions; Requirements; See Also. Sets the transparency of the layer. 100 being fully transparent and 0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found