It doesn’t get written to the C:/myfolder directory.
After searching C:/ it appears in Windows recent folder
save() description says it is saved by default in the sketch folder.
If i don’t give path it does indeed appear in that folder OK.
But description says that an absolute path can be used instead.
Apparently you’re using curly quotes instead of straight quotes. Replacing these quotes worked for me and the image was written to C:/myfolder/image.png
it is just happening ( by the forum topic editor ) when you post code here
“test”
instead inside
</> code tag
"test"
@jeffmarc at first, processing is a project structured IDE
so it supports firstly a relative file read and save.
they wanted to make it very smart so the
read operations use the sketch path AND its sub dir /data/
write can obviously only use one, here the sketchpath
Neither of these methods give any error, however , the file does not appear in the directory.
Could it be a Windows setting that is not allowing it to be written?
and that folder was created and the file was written,
but i am on Win 10 as usual admin user ( but was not asked for permission )
( a linux OS would never allow to write there without “sudo” )
is it possible that you are login as a user with reduced privileges?
Windows might prevent you from writing there.
you should test that manually from file manager first.
anyhow back to default, you did confirm that writing to
sketchbook path (or its /data/ ) path works fine?
anyhow it would also confirm that processing installation is OK
and
JAVA execution not blocked by windows defender.
what / where is that? and does that still happen?
again, if windows is in a condition ( like hard disk error… )
a manual test to create folder and file would check on that.
Yes , if i just use
save(“test.jpg”) it appears in the sketch folder
I am using win 10 pro signed in as admin
only account on PC no one else
I use PC for development only
I regularly copy files from one dir to another and create dir from thumb drives
no problem
I just wanted to confirm with someone it does work
I don’t understand why it doesn’t either.
will try on another PC and see what happens.
Tested OK on my Win 8.1 laptop.
saved to the C:/avsufa directory OK
So must be a windows thing on win 10 pro but I don’t know what.
I am signed in as admin , what else do you need to write to any directory?
Using Processing 2.2.1
Works fine with Win 8.1
???
possibly “reboot or even cold restart” would have been a good tip?
as recently i read here about, that many open?running java’s give processing a hard time…
It is a phrase, like “pilot error”, that is a funny way of saying “the person in the cockpit in charge of flying / operating (me) was the source of the error, not the plane / machine / code” Pilot error - Wikipedia Urban Dictionary: Cockpit Trouble
Programmer error.
Now I have new issue.
camavailable() is true for one image grab then will not grab again, goes to false and stays that way.
I have another program that grabs an image in the draw loop and it works fine.
Both on the same computer , same camera .
I run one and it works grabbing continuous images
the other grabs one and stops
Any clue would have that effect? there are no camStop() commands in either program.
Both start the camera in the setup section then the draw loop
I can’t find anything that should cause a disconnect once camStart() issued is setup.
Two programs, same libraries and same camera, one works and the other doesn’t?
I’d suggest starting by stripping down your broken program until you get down to just the image grab and display – nothing else. At some point, you will might remove something “unrelated” and be surprised when it start working.
OK , i know i can do that , just wondered if anybody had a clue what might cause this.
I have put test code in draw() loop to grab an image every 10 frames.
It counts up to 10 grabs a frame and then never gets reset by camavailable() true .
But it never goes true again so its just looping doing nothing and i get one image grabbed and displayed
its a simple loop: if framecount=10 and camavailable=true then camread, display image , reset frame count to 0, increment framecount in draw loop