i know how to save a PImage as a png but i have to overwrite an existing file. can i manually create a new png file in my data folder and then write a PImage to it?
if i just try to do PImage.save(filename) it tells me i need an “absolute path” which i’m interpreting as a pre-existing file to write over. i know there’s a way to save a screenshot of the entire canvas, how can i do this with just a PImage file?
You can save the screen with saveFrame(String+".dataType");
saveFrame("image.png"); //saves the screen as image.png
saveFrame("imageNumber"+counter+".jpg"); //saves the screen as a imageNumber<int value>.jpg
//saves frame in the newly created frames folder, with the current frameCount
//replacing the ##### ; so frame 123 would look like this: frames folder > frame00123.jpeg
This means that you can actually customize the string (or use the default function of processing to replace the ### with frameCount.
i’ve been trying to use PImage.save(), don’t you need to already have a file that’s called that? i want to make new image files and i can’t do that with save because it needs an ‘absolute path’
essentially i’m doing image processing to change the colors of images- but i don’t want to have to do that every time because it’s slow so i wan’t to save each new color version of the image file. but i can’t do out.save(“data/”+name); because name isn’t an ‘absolute path’- it’s a variable