Questions tagged [premultiplied-alpha]

Colorspace where each color component is multiplied by alpha value. This makes alpha blending faster and prevents color distortion when blending semitransparent colors together.

35 questions
2
votes
0 answers

How to use the TextureTool to create a PVR with premultiplied alpha?

How do I use the XCode texturetool to create a pvr texture with premultiplied alpha for iPhone?
Nitzan Wilnai
  • 923
  • 9
  • 24
2
votes
2 answers

PNG Image with BGRA CgBI premultiplied alpha

I have PNGs in Apple's iOS optimized BGRA PNG format (what I get using OptimizedPNG) and want to draw them in a way that tells CoreGraphics NOT to ignore the alpha component of the image. I'm drawing to a CGContextRef in drawRect: Edit: the rendered…
1
vote
1 answer

Impact of TYPE_INT_ARGB_PRE

I've been having some issues with a ConvolveOp that can be fixed by setting the imageType of the BufferedImage I'm working with to TYPE_INT_ARGB_PRE (see related SO answer here). Unfortunately I don't fully understand all the implications of…
Markus A.
  • 12,349
  • 8
  • 52
  • 116
1
vote
1 answer

Extract OpenGL raw RGB(A) texture data from png data stored in NSData using libpng on iOS

Unfortunately, there appears to be no way to using a built-in method on iOS to extract 32 bit RGBA data from a PNG file without losing the alpha channel reference. Therefore, some people have been using libpng to extract their OpenGL textures.…
Joshcodes
  • 8,513
  • 5
  • 40
  • 47
1
vote
1 answer

Multiplying every pixel by its alpha Open GLES 1.1 (premultiplication) & then reverse

I am working on a project that is in GLES 1.1. It has to be GLES 1.1. But it has to do some premultiplication i.e. get every pixel, and change it from rgba = r*a,b*a,g*a,a. And then later reverse it. If i had access to shaders it would be no…
1
vote
2 answers

Pre-multiplying alpha for DXT5

I load DDS images (DXT5) with transparent alpha into OpenGL. Because the alpha is not pre-multiplied and can not be pre-multiplied based on DXT5 specs I get thin black halo around the visible part of the texture because I do some blending operations…
Michael IV
  • 11,016
  • 12
  • 92
  • 223
1
vote
0 answers

Particle Blend Issue with premultiplied alpha

I was trying to save some texture from 3D rendering scene,and then get them to reuse.The big problem is that rgb value can not match its alpha value.I need some picture without black edge,so I must use rgb colors to divide its alpha value(Image…
0
votes
1 answer

imagecopyresampled in php - premultiplied alpha issue

I have an issue with imagecopyresampled for buffers that use alpha values. apparently the algorithm premultiplies the pixels alpha values before filtering, this results in black borders arround objects. Steps to reproduce: take an image that is…
Mat
  • 4,281
  • 9
  • 44
  • 66
0
votes
0 answers

Merge a pre-multiplied pixel into a canvas with non-pre-multiplied pixels, controlling the intensity

I have a byte[] containing pre-multiplied pixels (it's a cursor image, arrow) and I want to write/merge into a canvas which contains pixels with non-multiplied alpha. But I also want to control the opacity of the cursor being merged. Previously, my…
Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
0
votes
1 answer

Render premultiplied data to transparent PNG file in Java

Long story short I have premultiplied Texture. I grab a FrameBuffer, clear it with (0,0,0,0), set the blend mode to glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA), and render the Texture. Then I grab the pixels glReadPixels(0, 0, width, height,…
yesbutmaybeno
  • 1,078
  • 13
  • 31
0
votes
1 answer

FLV premultiplied alpha channel - adding to webpage as a swf?

I'm very new to premultiplied alpha channel and the only application I have is Adobe Flash, I have this FLV movie file that's got a premultiplied alpha channel and I want to insert it into a webpage to play as an animation, I imported it into flash…
Reina
  • 315
  • 1
  • 6
  • 21
0
votes
1 answer

How to eliminate halo on blurred edge?

So I am working on a filter that performs a blur. When the image has an alpha channel, it is blurring incorrectly. This is because it is blurring with the colored pixels that lie on the alpha=0 sections. I have created an example to illustrate. In…
Rich95
  • 199
  • 1
  • 3
  • 18
0
votes
2 answers

Why does not using premultiplied alpha have "significantly worse performance"?

QPainter is responsible for drawing and compositing in Qt. There is a section in the documentation that talks about performance. My question is regarding the bolded sentence from the following paragraph. Raster - This backend implements all…
Indiana Kernick
  • 5,041
  • 2
  • 20
  • 50
0
votes
1 answer

How to cause .NET to save a TIFF in PARGB32 format?

I have created a bitmap in PARGB32 format. I realize PNG cannot store premultiplied alpha (at least, marked as such), but I believe TIFF can. How can I force .NET to save a TIFF in PARGB32 format? By default, it appears to load back as AGRB32, even…
James
  • 1,874
  • 1
  • 16
  • 18
0
votes
1 answer

math formula for color and alpha in webgl

body { background-color:black; } #myCanvas { background-color:rgba(55,23,88,0.5); // (bg_R,bg_V,bg_B,bg_A) } var myCanvas= document.getElementById("myCanvas"); gl = myCanvas.getContext("webgl", { premultipliedAlpha: true , …
oceanGermanique
  • 336
  • 3
  • 16