Loading...
Logo
Processing Forum

Problem using save()

in Programming Questions  •  3 years ago  
Hello all, 
I can't find why, I create a PGraphics, I draw things on it, and when I use the save() function, 
the colors are denatured, there is a blue halo... 
EDIT: ONLY IF .JPG, png is ok.
but in the screen the PGraphics is ok.
From where could come the problem?

Here is an outpout example :  (I removed the head of the man before, there is no white in the outpout image)

Replies(3)

can you try to convert it into a PImage first an then save this. it should work if the Image is not too big. you can "convert" it by copy (and the whole imageSize as parameters) or maybe if it wont work... pixel by pixel
Copy code
  1. EDIT: ONLY IF .JPG, png is ok.
Then perhaps the issue is related to (lack of) transparency.

Secondly, I have had coloring issues before using P2D and PGraphics. Have you tried different renderers?

THX Ramin!

I changed 
Copy code
  1. pg.save(filename);
 into 
Copy code
  1. pg.get().save(filename);
and the problem is fixed!
(and my image is 21000x2900px)

@ammon: It was not a transparency problem, cause .tif was OK too.