compositing

Expected behavior when using CIAdditionCompositing to add pure black?

爷,独闯天下 提交于 2021-01-27 06:22:48
问题 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 see a gray square whose color matched the original mid-gray square exactly (because all color components of the black image have value 0). However, the final result is actually brighter than the original gray image: I don't understand how this result is

Implementing Porter-Duff Rules in Direct3D

試著忘記壹切 提交于 2019-12-23 01:44:12
问题 What Direct3D render states should be used to implement Java's Porter-Duff compositing rules (CLEAR, SRC, SRCOVER, etc.)? 回答1: I'm haven't used Java too much, but based on the white paper from 1984, it should be a fairly straightforward mapping of render state blend modes. There are of course more that you can do than just these, like normal alpha blending (SourceAlpha, InvSourceAlpha) or additive (One, One) to name a few. (I assume that you are asking about these specifically because you are

Java - rounded corner panel with compositing in paintComponent

回眸只為那壹抹淺笑 提交于 2019-12-20 09:57:07
问题 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 painting, but still have rounded corners Must not use setClip (or any clipping) Must have decent performance Hopefully someone picks this up quick, it seems easy. I will also award the bounty if there is a well-explained reason why this can never be done,

ffmpeg - compositing a video within a video in the centre

我的梦境 提交于 2019-12-12 11:31:05
问题 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 overlay video as it will be user uploaded and could be any size/ratio. Here's an example of what I'm trying to achieve: This is the background image: Now I want to overlay a video over the top: This should also work: Essentially no matter what the

Core Image filter CISourceOverCompositing not appearing as expected with alpha overlay

依然范特西╮ 提交于 2019-12-10 04:19:32
问题 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 issue in a simple Xcode project. It creates an image with orange, white, black text drawn with 0.3 alpha, and that looks correct. I even threw that image into Sketch placing it on top of the background image and it looks great. The image at the bottom

Implementing Porter-Duff Rules in Direct3D

前提是你 提交于 2019-12-08 04:56:31
What Direct3D render states should be used to implement Java's Porter-Duff compositing rules (CLEAR, SRC, SRCOVER, etc.)? I'm haven't used Java too much, but based on the white paper from 1984 , it should be a fairly straightforward mapping of render state blend modes. There are of course more that you can do than just these, like normal alpha blending (SourceAlpha, InvSourceAlpha) or additive (One, One) to name a few. (I assume that you are asking about these specifically because you are porting some existing functionality? In that cause you may not care about other combinations...) Anyway,

Core Image filter CISourceOverCompositing not appearing as expected with alpha overlay

五迷三道 提交于 2019-12-05 04:24:39
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 issue in a simple Xcode project . It creates an image with orange, white, black text drawn with 0.3 alpha, and that looks correct. I even threw that image into Sketch placing it on top of the background image and it looks great. The image at the bottom of the screen shows how that looks in Sketch. The problem is, after overlaying the text on the

Recreate HSV color using blend modes

此生再无相见时 提交于 2019-12-05 00:25:12
问题 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 together using Photoshop-style blending modes (multiply, overlay, screen, hue, etc). I already know how to do this for RGB images: split each channel into its own red, green, or blue image with values ranging from transparent to that channel’s

How to get started writing a compositing WM?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 05:26:01
问题 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 version currently available. Are there any other good resources for how to do this, or alternatively, a really bare-bones compositing WM to look at the source of? 回答1: There are two parts in your question: 1) How to write WM 2) how to write composite

Java - rounded corner panel with compositing in paintComponent

无人久伴 提交于 2019-12-02 20:50:17
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 painting, but still have rounded corners Must not use setClip (or any clipping) Must have decent performance Hopefully someone picks this up quick, it seems easy. I will also award the bounty if there is a well-explained reason why this can never be done, that others agree with. Here is a sample image of what I have in mind (but using AlphaComposite )