Questions tagged [alpha-transparency]

The alpha transparency of an image defines how transparent the pixels of this image are. Typically, each pixel has an alpha value between 0 (fully transparent) and 255 (fully opaque).

Alpha transparency is an attribute of pixels within an image (or image layer) which determines how transparent the pixel is, by blending the pixel color with the color of the pixel in the layer beneath it. most image editing software allow to edit a layer or image alpha transparency. The alpha value is saved in addition to the RGB value of the pixel. Ranges of transparency may change according to the software setup.

Alpha Transparency as part of Alpha Compositing.

468 questions
3
votes
1 answer

Displaying 32 bit image with alpha channel in Win32

Screenshot: https://i.stack.imgur.com/5NKZI.jpg Hello, I am trying to set png with alpha channel on top of static control, but transparent pixels always fill white or black color. It's not critical if the image is on top of the static control or…
Borys Shobat
  • 258
  • 1
  • 3
  • 13
3
votes
1 answer

32-bit images on ImageList

I've got the following image: I'm reading it from resources, putting into ImageList and then reading it from ImageList to draw on my control's surface. But when I'm doing that, image seems to loose information about alpha channel: Here are all…
Spook
  • 25,318
  • 18
  • 90
  • 167
3
votes
2 answers

Swift : How to create a UIView with transparent circle in the middle?

There are some answers for objective c but did not find any regarding swift. I would like to create a dark view with transparent circle in middle so that user can see the subview and interact with it. How can I implement that using swift. More…
Sam
  • 1,101
  • 2
  • 13
  • 26
3
votes
2 answers

imagecopymerge does not work correctly with partially transparent images

I have an image that has opacity: When I try load it with: $img = imagecreatefrompng('cheek-01.png'); header('Content-Type: image/png'); imagepng($img); it will become: I want to add (merge) this image with another image (I know how can merge two…
Yuseferi
  • 7,931
  • 11
  • 67
  • 103
3
votes
1 answer

Transparency for specific values in matrix using Gnuplot while preserving the palette?

Here's an interesting problem: I have a 2D "matrix" of double-precision, binary data I'd like to plot using Gnuplot. This is easily done as follows: plot "foo.dat" binary array=384x384 format='%double' with image The trick is that certain "regions"…
jvriesem
  • 1,859
  • 3
  • 18
  • 40
3
votes
1 answer

Why does System.Drawing.Graphics blank the RGB channels when Alpha==0?

This has become a serious blocker for a program I'm working on to manipulate images that have Alpha channels. Many of the images I have contain color information where an Alpha channel is completely transparent, and yet as soon as I try to load them…
midspace
  • 922
  • 9
  • 18
3
votes
1 answer

PIL - Add semi-transparent polygon to JPEG

I'm trying to use this this approach to add a semi-transparent polygon to an image. The problem is the image is a JPEG. I know that JPEGs don't have an alpha channel, so I was hoping there was a way I could have PIL take in a JPEG, convert it to a…
Jenny Shoars
  • 994
  • 3
  • 16
  • 40
3
votes
1 answer

Change how R stacks Transparency

Right now, when I produce a scatter plot with transparency in R, it looks like, when two points stack, each with transparency alpha, the cell gets transparency min(1, 2*alpha). Instead, I'd like it to get transparency 1 - (1 - alpha)^2, in order to…
3
votes
1 answer

Resize png image in Delphi - incorrect alpha channel

I am resizing png images which might have alpha channel. Everything works good, with one exception: I get some gray pixels around the transparent areas. The original image doesn't have any drop shadows. Is there a way to fix this / work it…
beerwin
  • 9,813
  • 6
  • 42
  • 57
3
votes
1 answer

Android Opengl 2.0 Alpha Blending issue - half transparent textures

I have this problem with Apha Blending in my game, when I draw a surface with alpha texture, what is suposed to be invisible is invisible, but parts that are suposed to be visible are half transparent. It depends on the amount of light - the closer…
Lucass
  • 147
  • 3
  • 12
3
votes
2 answers

Python Image Library - Make area of image transparent

I have a quick question for someone who knows the Python Image Library better than I do. I have a png image with an alpha-channel, and I want the top two rows of pixels to be completely transparent. That's it! So far, my efforts make the top two…
DizzyDoo
  • 1,489
  • 6
  • 21
  • 32
3
votes
1 answer

Why would transparency not work in LibGdx on Android 2.3.5?

I'm running into trouble with LibGdx developing an 3D Android app. I metioned it briefly in my answer to my own question, but I have been unable to figure out why I cannot get transparency from .png images. The textures are transparent, I've checked…
finlaybob
  • 697
  • 10
  • 30
2
votes
3 answers

Rendering 3D Models With Textures That Have Alpha In OpenGL

So Im trying to figure out the best way to render a 3D model in OpenGL when some of the textures applied to it have alpha channels. When I have the depth buffer enabled, and start drawing all the triangles in a 3D model, if it draws a triangle that…
Jeremy
  • 145
  • 2
  • 12
2
votes
3 answers

HTML5 get number of alpha-pixels in canvas

I need to get the ratio of transparent/opaque pixels in my canvas. What is the best way to do this? UPDATE: Based on the below posts I ended up writing this code: function getNumberOfAlphaPixels(can) { var step = 200; //We skip 200 pixels to…
andr111
  • 2,982
  • 11
  • 35
  • 45
2
votes
1 answer

Gallery android:unselectedAlpha

I have a Gallery that works perfectly, except only the first element is ever displayed at full alpha. I have the Gallery's style set to style="android:galleryItemBackground", and android:unselectedAlpha="0.75" is also set. This works, in that the…
Matthew Runo
  • 1,387
  • 3
  • 20
  • 43