Open
Description
Describe the bug
When I try to perform a composite process with multiply, for some reason the overlay image gets a gray border. This is only happening with the multiply process. When checking with Photoshop, this issue does not occur, and the image appears without the border as it should from the beginning.
To Reproduce
def compose_images(art_image_path:, base_image_path:, x:, y:)
base_image = Vips::Image.new_from_file(base_image_path)
art_image = Vips::Image.new_from_file(art_image_path)
base_image.composite(art_image, :multiply, x:, y:)
end
Resulting image:
Expected image:
Additional context
To solve this problem, I applied a white background instead of transparent, but I'm not sure if this is the correct way to do it...
def compose_images(art_image_path:, base_image_path:, x:, y:)
base_image = Vips::Image.new_from_file(base_image_path)
art_image = Vips::Image.new_from_file(art_image_path)
art_image = art_image.flatten(background: [255, 255, 255])
base_image.composite(art_image, :multiply, x:, y:)
end