We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I'm beginner, and I wanted to know if it's possible to ask the user in which folder a PImage object should be saved. I'm using nameoftheimage.save("outputImage.jpg") command, which works pretty well, but simply saves the image in the sketch folder without asking the user where to and in which format. I think i should use selectOutput(), but I'm not really sure how to do it... could someone help? Thanks!
Answers
https://forum.Processing.org/two/discussions/tagged?Tag=selectoutput()
Yes, I've already looked on the other topics, that's how I thought I could go for selectOutput(), but still can't figure out how to actually do it and apply it to a PImage object. Thank you thought for your answer.
This is from post https://forum.processing.org/two/discussion/12165/can-i-use-selectoutput-to-create-and-write-to-an-image-with-pimage-save#latest
I hope it helps,
Kf
I tried something that too, but whenever I do I just get get this error: "The method selectOutput(String) in the type PApplet is not applicable for the arguments (String, String)". I don't know if posting the whole code would be of any help. Anyway, I've just realized I forgot to say I'm using version 1.5, and I have to use it for this exercise.
Hi, I found out a solution, just used this string: Pimagename.save(selectOutput("Select a file to write to:")); Thank you for your answers!
you were calling selectOutput() incorrectly, sending it two arguments instead of one.
this might be a version thing because the reference for v3 seems to say that 2 strings are ok
https://processing.org/reference/selectOutput_.html
yes, v1.5.1 is different:
Syntax:
selectOutput()
selectOutput(prompt)