Questions tagged [blend-mode]

21 questions
56
votes
8 answers

Flutter - How to blend an image with a gradient colour?

I am attempting to replicate a login screen design my designer did for an app. The background image uses a blendMode of softLight, the catch is that the colour it blends with is a gradient colour. Secondly there is actually two layers of different…
Robert Stevens
  • 7,817
  • 3
  • 13
  • 15
4
votes
0 answers

JavaFX Canvas "draw" transparency (draw hole)

Is it possible to set a lower value for a rectangle (or any shape) on a JFX canvas after it has been previously drawn with higher alpha? For example gc.setFill(Color.BLACK) gc.fillRoundRect(0, 0, 30, 30, 2, 2); // Next command shall set…
DragonGamer
  • 834
  • 3
  • 9
  • 27
3
votes
2 answers

How can I mask a widget with a png UI image using flutter's custom paint

I can't seem to mask a widget with a png ui.Image and keep transparency. The transparent (invisible) pixels are rendered black. I have tried using BlendMode srcIn when drawing the mask png image on my custom painter, the expected behavior is the…
jony
  • 89
  • 2
  • 5
3
votes
1 answer

Image Blend Modes in Android Studio (Like photoshop, paint.net)?

I am trying to blend two images the same way photoshop or paint.net blend them, with different blend modes like Difference, Multiply, Additive, Color Burn, Glow, etc. I have found that PorterDuff.Mode works quite well, but it lacks blending effects…
user10267344
  • 31
  • 1
  • 2
2
votes
0 answers

Flutter ColorFiltered Widget - White Balance?

I'm trying to apply a White Balance or Auto White Balance to a child widget using ColorFiltered. https://api.flutter.dev/flutter/dart-ui/ColorFilter-class.html Just to clarify what I mean by "White Balance": "White balance (WB) is the process of…
lgozalvez
  • 23
  • 1
  • 5
2
votes
2 answers

ImageMagick - Alpha Mask on transparent background

I want to composite some pngs onto one png using Imagemagick. One of the images (b_0_1.png) is a mask. I need to apply this using additive composition. But there is a problems with the background in the result, which should be transparent, but has a…
user5629061
2
votes
2 answers

Apply CSS blend-mode to borders only

I've been working on a small website, just as an exercise for integration. But as I don't have an extended knowledge of CSS, I do not know if it is possible in the end : I have in the website a form, with text boxes surrounded by a border, on which…
Solomai
  • 33
  • 1
  • 6
2
votes
0 answers

SpriteKit: How to cut a moving hole in a sprite

I am trying to achieve an effect of a moving flashlight (controlled by the player) which cuts a hole in a dark overlay. I found a lot of methods to cut a static hole in a node for example to cut the hole using the blend mode and assigning the…
greensn
  • 21
  • 3
1
vote
0 answers

Why does Pillow's ImageChop.multiply() not do the same thing as Photoshop's multiply?

Alternatively, how can I simulate this Photoshop affect programmatically? In Photoshop, I have two layers: A simple "Magenta" fill, with blend mode Multiply, and Opacity 100% And a simple "Cyan" fill, with blend mode Multiply, and Opacity…
1
vote
0 answers

How to get true 1-pixel width black color line in p5.js

The p5.js line() function does not seem to be able to draw a true 1-pixel wide black line. (Or any other color.) strokeWeight is 1 pixel, but the resulting line is 2 pixels wide. color is black with no transparency, but the resulting color is…
Leftium
  • 16,497
  • 6
  • 64
  • 99
1
vote
0 answers

Container BlendMode disappears when scrolling a listview - Flutter

I'm trying to apply a backgroundBlendMode to a Container using its decoration attribute, the Container is inside a listview, when running the app everything looks as expected until scrolling the listview, the blend mode disappears and the color is…
Basel Abuhadrous
  • 1,444
  • 1
  • 14
  • 30
1
vote
1 answer

How to implement custom blend mode in SDL2?

SDL2 provides by default 3 blend modes: alpha blend, additive, and multiply. However I need to render filled rectangles using the Linear Light blend mode. Is this possible to implement using OpenGL, or as a combination of the 3 built-in blend modes,…
Emil Laine
  • 41,598
  • 9
  • 101
  • 157
0
votes
0 answers

How to make a custom BlendMode?

I type an A in to my custom view on top of it's canvas background which is currently a bitmap and want to, programmatically, get the info of the pixels of the Destination canvas underneath where the A will be. Then do some custom editing to the…
0
votes
0 answers

SwiftUI: How to use blendmode overlay with new inner shadow modifier?

to keep it short - I'm trying to achieve this look: It's a RoundedRectangle with the following settings: My problem is that I can't put .blendMode(.overlay) after setting the shadow color without Xcode yelling at me the compiler is unable to…
b.joe
  • 69
  • 4
0
votes
1 answer

Python - replicating the GIMP's "Erase color" blend mode

I'm looking for a way to recreate the GIMP's Erase color blending mode in Python 3 & OpenCV2. I know it's possible to erase color using the that library, but the code I run works on exactly one of them. Furthermore, I don't believe such small amount…
kubinka0505
  • 147
  • 1
  • 8
1
2