I need to copy a PNG image to a JPG image. Using the command:
pimg.set (x, y, img);
I paste the image not as a PNG but as a JPG, thus inserting the background.
Any advice to solve this problem?
Hi @michele_rinaldi,
based on your code snippet you’re copying a PImage to another PImage, even if you are considering it as a png or jpg. Please describe in more detail what you want to achieve.
Cheers
— mnse
Is the png format preserved internally or does processing convert to jpg silently?
when I load the image I specify that it is a PNG, but in the process of copying to another image, Processing automatically makes it a JPG
Hi,
What do you mean by …
As state before … you have two PImage objects not a png and a jpg object !?
To help, please show your code (or parts of it which demonstrates what you are doing), tell us what happens and your expectations what should be happen …
Cheers
— mnse
Hello @michele_rinaldi.
The links below should give you a better understanding of what a PImage is.
Tutorial:
References:
https://processing.org/reference/PImage.html
:)