Questions tagged [compositing]

Compositing is the combining of visual elements from separate sources into single images.

See Digital compositing on Wikipedia.

61 questions
21
votes
5 answers

Set BufferedImage alpha mask in Java

I have two BufferedImages I loaded in from pngs. The first contains an image, the second an alpha mask for the image. I want to create a combined image from the two, by applying the alpha mask. My google-fu fails me. I know how to load/save the…
Zarkonnen
  • 21,429
  • 14
  • 62
  • 80
15
votes
2 answers

Java - rounded corner panel with compositing in paintComponent

From the original question (below), I am now offering a bounty for the following: An AlphaComposite based solution for rounded corners. Please demonstrate with a JPanel. Corners must be completely transparent. Must be able to support JPG…
Ben
  • 47,286
  • 44
  • 159
  • 208
10
votes
3 answers

Core Image filter CISourceOverCompositing not appearing as expected with alpha overlay

I’m using CISourceOverCompositing to overlay text on top of an image and I’m getting unexpected results when the text image is not fully opaque. Dark colors are not dark enough and light colors are too light in the output image. I recreated the…
Jordan H
  • 45,794
  • 29
  • 162
  • 306
8
votes
2 answers

How to get started writing a compositing WM?

I would like to write a basic hardware-accelerated window manager, so I've been looking for some documentation on how to get started, but I've only managed to find this tutorial, which uses an outdated version of Clutter and won't build with any…
Skyler
  • 867
  • 1
  • 9
  • 22
6
votes
1 answer

Force headless chromium/chrome to use actual gpu instead of Google SwiftShader

I'm trying to print html to pdf using headless chromium (using puppeteer) and everything works fine except if html contains large png images (over 10.000x10.000px) the whole process of rendering page takes extremely long (up to half an hour, but if…
Danhoss
  • 61
  • 1
  • 3
6
votes
1 answer

How to tell whether the colors in a video frame decoded by FFmpeg are pre-multiplied by alpha?

When I decode video frames with FFmpeg (avcodec_decode_video2(), sws_scale()), with some videos (e.g., ProRes4444), I get colors pre-multiplied by alpha, and with other videos (e.g., QuickTime PNG), I get colors that aren't pre-multiplied by…
smokris
  • 11,390
  • 2
  • 37
  • 55
6
votes
1 answer

Recreate HSV color using blend modes

I’m working on an app that creates images whose hue, saturation, and value change according to different parameters. For performance reasons, it would make sense to render the hue, saturation, and value components separately, and then composite them…
Zev Eisenberg
  • 7,836
  • 5
  • 31
  • 74
5
votes
1 answer

Expected behavior when using CIAdditionCompositing to add pure black?

I am attempting to understand how CIAdditionCompositing works. As part of my testing, I have created a square mid-gray image: and a square black image: When I combined these two square images using a CIAdditionCompositing patch, I expected to…
stkent
  • 18,470
  • 14
  • 80
  • 99
5
votes
1 answer

Cocoa: Using an NSGradient as a mask for drawing below it

I am trying to draw a shape's reflection using Cocoa. I have already applied an NSAffineTransform and redrawn the shape successfully, but now I can't figure out how to draw an alpha mask over it. I'm using an NSCompositeDestinationOut operation, but…
Jon Gauthier
  • 23,502
  • 5
  • 60
  • 68
4
votes
3 answers

automatically composite sound - php or something like that - GD library for sound?

I am looking for a way to accomplish the following: A user programs some drum loops in flash and is somehow able to download or save an mp3 of the loop. I thought that the pattern could be composted on the server side. Then a link to the file is…
Trass Vasston
  • 661
  • 2
  • 6
  • 18
4
votes
1 answer

ffmpeg - compositing a video within a video in the centre

I'm looking to composite a video with ffmpeg that places the video in the centre no matter what the composited video's aspect ratio/size. The "background" video will always be 16:9 and 1920x1080px. I won't know the aspect ratio or size of the…
kieran
  • 2,281
  • 4
  • 24
  • 42
3
votes
3 answers

How does blending work with GLSL ES fragment shaders in WebGL?

I'm trying to get a simple effect to display using WebGL. Naturally, this means I'm using the fragment shader language defined in the GLSL ES 1.0 specification. The code I am working with is largely copied from other sources. It sets up a square and…
Sean Seefried
  • 1,189
  • 7
  • 17
3
votes
4 answers

Mix two .png images with alpha border with CSS

Is there a way to blend two PNG images to make perfect match when they both have border with alpha on it? This is an example of the issue that I have: img { position: absolute; left: 0px; top: 0px; } .container { height: 512px; …
Pece
  • 637
  • 3
  • 8
  • 20
3
votes
1 answer

Pixman compositing vs. alpha blending

Below is a small test program (works on little endian machines). As is, the result is already strange to me : in: r=20 g=20 b=80 a=FF (#202080FF, ok!) out: r=90 g=90 b=C0 a=FF (#9090C0FF, strange...) Where as I expected the fill color #FFFFFFFF x…
Eric Nicolas
  • 1,342
  • 1
  • 15
  • 24
3
votes
0 answers

Android: Compositing multiple layers of video into a new video

I have some basic experience with video and imagery in Android using SurfaceViews, mediarecorder, VideoView etc. What I would like to do however is to composite multiple layers of video (generally with a top layer having an alpha channel to expose…
1
2 3 4 5