alphablending

Diffrent values of alpha for different regions of a sprite(Flex/Actionscript)

Here is my problem : I have a Sprite covering the entire screen. Other than a certain rectangle of this sprite I want the rest of the sprite to have alpha = 0.5. And for that particular rectangle, I want alpha = 0. Is it possible? How? ...

Is that a right way using premultiplied alpha to do alpha blending in GL-ES?

As I know alpha composition uses straight alpha basically. But all GLES blending sample codes I've seen are using premultiplied alpha. Is this correct and right way to do this? Is premultiplied alpha a regular way in real-time graphics? ...

Constant opacity with glBlendFunc on iPhone

What glBlendFunc should I use to ensure that the opacity of my drawing is always the same? When I use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) and multiple images are drawn on top of each other, the result is more and more opaque until it's completely opaque after a certain number of imgaes. The closest I have come is to use gl...

Use only alpha channel of texture in OpenGL?

Hey, I'm trying to draw a constant color to the framebuffer and blend it using the alpha channel from an RGBA texture. I've been looking at glBlendFunc and glBlendColor, but can't seem to figure out a way to ignore the RGB values from the texture. I'm thinking I'll have to pull out the alpha values myself and make a second texture with G...

Variable alpha blending in pylab

How does one control the transparency over a 2D image in pylab? I'd like to give two sets of values (X,Y,Z,T) where X,Y are arrays of positions, Z is the color value, and T is the transparency to a function like imshow but it seems that the function only takes alpha as a scalar. As a concrete example, consider the code below that attempt...

Making alpha PNGs with PHP GD

Hello, I've got a problem making alpha PNGs with PHP GD. I don't have imageMagik etc. Though the images load perfectly well in-browser and in GFX programs, I'm getting problems with Flash AS3 (actionscript) understanding the files. It complains of being an unknown type. But, exporting these files from Fireworks to the same spec works f...

Is it possible to create a CImageList with alpha blending transparency?

I would like to knwo if it is possible to create a CImageList with alpha blending transparency. Sample code that creates a CImageList with ugly transparency (no alpha blending) CGdiPlusBitmapResource m_pBitmap; m_pBitmap.Load(IDB_RIBBON_FILESMALL,_T("PNG"),AfxGetResourceHandle()); HBITMAP hBitmap; m_pBitmap.m_pBitmap->GetHBITMAP(RGB(0...

Preserving alpha issues with loaded UIImages - how to avoid discarding alpha values on import?

My application lets the user save/load images with alpha values to the camera roll on the device. I can see in the Photos application that these images are appropriately alpha'd, as alpha'd areas just appear black. However, when I load these images back into the application using the valueForKey:UIImagePickerControllerOriginalImage messa...

Per-component alpha-channels with OpenGL?

Hi, I'm a complete beginner with openGL, and I'm trying to see if what I want to do is feasible before I get started. I'd like to know if it's possible to perform blending with one alpha channel per component (one for red, one for green and one for blue) with openGL? If not, what are some possible workarounds? Thanks! ...

[SWT/RCP] Alpha blending is slow on linux

we are developing an SWT/RCP(Eclipse 3.5) application on both Windows and Linux (on identical hardware). The application is a GIS app which shows several layered maps(PNG images) rendered with alpha blending. org.eclipse.draw2d.Graphics.setAlpha(...); org.eclipse.draw2d.Graphics.drawImage(...); On Windows the performance is pretty goo...

GTK# on Windows: how to get desktop alpha-blending working?

Subj. I found this and translated into code below. But it shows only a dark-blue rectangle with no transparency at all. class MainClass { public static void Main (string[] args) { Application.Init(); Gtk.Window w = new Gtk.Window(Gtk.WindowType.Toplevel); w.ExposeEvent += new ExposeEventHandler(w_ExposeEv...

Blending transparent textures with depth

I am trying to blend textures which have transparent areas: glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, ...); glVertexPointer( 2, GL_FLOAT, 0, ... ); glEnable (GL_BLEND); glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 ); Unless I add glDisable(GL_DEPTH_TEST), transparent parts of the t...

How to make the form into fully transparent 32bit alpha?

i use to create a full transparent form, but the png and the 32bit image will not blend to the form and images is not properly displayed its trnsparency. i get the concept here but i cannot put button on it. all abject are invisible except the image backgound. by the way my compiler is delphi7 and D2009 ...

Opengl: use a texture only to give alpha channel to a colored object

I'm new at OpenGL and I can't find out how to do this: I want to render a letter and be able to change it's color, so I have a texture with the letter on a transparent background. I managed to render it using this code: glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) But that renders the letter in black, as it's...

What is the correct way to perform alpha blending? (C)

Hi, I'm writing a very simple graphics library, and I'm trying to figure out how to do alpha blending. I tried it a few times, but my results were less than satisfactory. According to Wikipedia, I should do: Value = (1-alpha)*Value0 + alpha*value1 This, however is not working at all. Maybe I'm doing something wrong? The code I've inc...

On the fly bitmap editing in Android

I'm creating a scene for a game. There's a background which is a bitmap and player objects. I want to have the player objects to be able to "eat" away at the background with a transparent color as they move around the board. Basically if an object is at a certain point a circle around that object is alpha'ed out of the bitmap. The edits...

Draw a texture in OpenGL while ignoring it's alpha channel.

I have a texture loaded into memory that is of RGBA format with various alpha values. The image is loaded as so: GLuint texture = 0; glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); self.texNum = texture; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE...

Intersection Region Color

i have drawn two semitransparent circles which intersect each other. I have found that the intersection region is deeper in color than other regions. is there any way to make the whole shape as one semitransparent color (color shouldn't be deeper in one area than others)? For more details: http://yfrog.com/0sneedtosolvep is it possible...

Basic draw method blenddstate not recognized?

I am pretty good at programming, however, i am new to c# (xna), i am following a tutorial to draw a sprite on screen and the blendstate method is not recognized when used like the following in the draw method: protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); /...

How can I alphablend only certain parts of a texture in DX 9?

Hello everyone! How can I alphablend only certain parts of a texture in DX 9? For example, layers in Photoshop (or any other photo editing program that supports layers). You can draw something in a layer (background filled with alpha), then place the layer over the original image (draw the texture on the screen) which leads to the or...