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
16
votes
2 answers

How to create transparent activity in android?

How to create transparent activity in android in that screen tap to dismiss button automatically dismiss the activity. please provide any solution.
Narasimha
  • 3,802
  • 11
  • 55
  • 83
15
votes
4 answers

How to set given channel of a cv::Mat to a given value efficiently without changing other channels?

How to set given channel of a cv::Mat to a given value efficiently without changing other channels? For example, I want to set its fourth channel (alpha channel) value to 120 (i.e. half transparent), something like: cv::Mat mat; // with type…
herohuyongtao
  • 49,413
  • 29
  • 133
  • 174
15
votes
1 answer

ggplot legend showing transparency and fill color

I'm plotting two semi-transparent ribbons together. Using the code below, without the scale_fill_manual portion, I get basically what I want, with a legend called "red", and labels blue and red. Adding the scale_fill_manual portion allows me to name…
RyanStochastic
  • 3,963
  • 5
  • 17
  • 24
14
votes
1 answer

R plot legend with transparent background

How to R plot legend with transparent background when using plot() function ?
Qbik
  • 5,885
  • 14
  • 62
  • 93
14
votes
2 answers

CGBitmapInfo alpha mask after swift 2.0

I am using a library from this github repo https://github.com/Haneke/HanekeSwift to cache the images that are being downloaded from a server. After updating to swift 2.0 everything is messed up. I've been able to fix everything but this…
aldominium
  • 291
  • 4
  • 13
14
votes
3 answers

Why does openCV's convertto function not work?

I have an image which has 4 channels and is in 4 * UINT8 format. I am trying to convert it to 3 channel float and I am using this code: images.convertTo(images,CV_32FC3,1/255.0); After the conversion, the image is in a float format but still has 4…
mans
  • 17,104
  • 45
  • 172
  • 321
14
votes
1 answer

Android: Cannot set VideoView background to transparent

I have a VideoView playing a video whose shape is not rectangular, (i.e. a rotating cylinder with rounded corners). The videoview is displayed within a LinearLayout that has a background colour. I would like the background of the videoview to be…
14
votes
1 answer

How to transparently shade alternate days on a plot?

What am I doing wrong here please? I'm trying to shade alternate 24-hr daily rectangles with transparent gray. But only the last rectangle from the for-loop gets drawn(?!?) If I do things manually instead of by for-loop it works fine. Is there a way…
smci
  • 32,567
  • 20
  • 113
  • 146
13
votes
2 answers

How to create an h264 video with an alpha channel for use with HTML5 Canvas?

I've been interested in this demo: http://jakearchibald.com/scratch/alphavid/ I also saw this question on here: Can I have a video with transparent background using HTML5 video tag? But I can't seem to figure out: How do you create h264, ogg and…
chuls
  • 217
  • 1
  • 5
  • 9
13
votes
1 answer

How to convert an image to an icon without losing transparency?

I have PNG images which I need to convert to an icon before displaying it. This is how I did it: public Icon ImageToIcon(Image imgTest) { Bitmap bitmap = new Bitmap(imgTest); Icon icoTest; IntPtr iPtr = bitmap.GetHicon(); icoTest =…
user1821499
  • 301
  • 4
  • 22
12
votes
4 answers

Access to raw data in ARGB_8888 Android Bitmap

I am trying to access the raw data of a Bitmap in ARGB_8888 format on Android, using the copyPixelsToBuffer and copyPixelsFromBuffer methods. However, invocation of those calls seems to always apply the alpha channel to the rgb channels. I need the…
12
votes
4 answers

Which CGImageAlphaInfo should we use?

The Quartz 2D programming guide defines the availability of the various alpha storage modes: Which ones should we use for RGB contexts, and why? For non-opaque contexts, kCGImageAlphaPremultipliedFirst or kCGImageAlphaPremultipliedLast? For opaque…
hpique
  • 119,096
  • 131
  • 338
  • 476
12
votes
4 answers

Semi-transparency in RStudio

I'm trying to create a plot with a semi-transparent confidence region around the regression line: library(car) library(ggplot2) library(effects) mod <- lm(salary~yrs.service+sex, data=Salaries) yrseff <-…
msoftrain
  • 1,017
  • 8
  • 23
11
votes
6 answers

Jetpack Compose Dialog - Is there a way to change the background transparency?

When we show a Dialog/AlertDialog in Jetpack Compose the background seems to be a bit dark, is there a way to adjust the background alpha or make it transparent? For eg: The White background in this image is turned into Dark grey when the dialog is…
11
votes
3 answers

Android Alpha Animation: Alpha value jumps back to old value after Animation ended

I have a ImageButton View on a Layout. If the users clicks the ImageButton the button should fade out. The buttons fadeout animation will be started like this: public void buttonClicked(View aButton){ final Animation aAnim = new…
Tom
  • 141
  • 1
  • 6
1
2
3
31 32