We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I’m trying to use saveFrame() with a P3D canvas and that results in black and white shapes instead of the colors I see!? Any ideas why and how to fix this? Thanks!
Answers
I'm not seeing this. Do you have a code example that shows this behavior?
I've actually noticed by now that the problem only arises when I try to save the images as GIFs! It works with jpg, png, tif and tga ... Is that a know limitation of saving as GIF in P3D?
GIF is not a supported output format.
See the reference: http://www.processing.org/reference/saveFrame_.html
Wow, that's surprising! So why does it usually work then afterall?
Also, some stuff in P3D gets saved correctly in GIF too. Weird ... I haven't identified yet why this specific code results in b&w GIFs!?
Not sure. There could be different explanations...
Looking for answers I turned to the source code. My findings:
So my conclusion at this time is:
Thanks a lot for this extensive answer, amnon! :)
It's too bad that GIF isn't supported yet since it's necessary to create animated GIFs ... or should one save them in a different format and then convert them manually to GIFs?
That is definitely a good option. It will ensure you have high quality output, which you can later turn into a GIF animation with all the speed, filesize, quality options you want. For example Photoshop has "save for web" support I believe. Most likely Gimp also has it. And of course there are other image editing and/or (freeware) GIF creation applications.
Alternatively, you can use the gifAnimation Processing library.