Loading...
Logo
Processing Forum
Hello, 

I've been wondering how can i get a proper export as a PDF file in a non-refreshing background sketch. My particles just draw their way around and creates a composition. Now when i do  Many Frames Into One File (With Screen Display) it draws all the frames so pdf just messes up the computer. What i want is to just capture the one frame, the exact look on the sketch. When i try  Single Frame from an Animation (With Screen Display) it just renders my particles without any drawings they made.

Or is there even a way to set a size parameter for a tiff in saveFrame(); function. for example, i got this 500x500 sketch and i want to get a tiff of it for 2000x2000?

I Hope i made myself clear, 
Thank you,
Metin.

Replies(9)

Thats a common problem, you can not save pixel manipulations or stuff that is drawn through time without calling a background as pdf. Only way is to save it as image. So you can set your sketchSize to 2000x2000 if you want to. Or try to use a PGraphics with this size and draw it offscreen.
i dont have enough resolution to make it 2000x2000, but ive never tried PGraphics, how does it work?
it should be possible to set the sketchsize beyond your screensize. just try to set it to 2000,2000 and use saveFrame to save an image.

Have you tried a variant of the Pausing While Recording (With Screen Display) method?
Ie. record the result of several draw() calls between a beginRecord() and an endRecord().
Hi phi.lho, you know i actually thought about it but never tried, will try asap and inform you right away, thanks both by the way for your suggestions and interests.
yes, this would be a solution depending on your sketch. like i said, if you have for example a sketch using particles systems or attractors leaving trails using a semitransparent background, or tons of overlapping lines you wont get the same result or your files could easily get really big so you cant open them as pdf... but depends on your sketch.
if you dont get a good solution show us some screens and we will find a good way.
Nah mate, when i draw on the screen then press Resume it just begins to capture from scratch, and does not capture the previous drawings. When i draw things around after a while, i get the Out of Memory error, so i really don't know how to handle it 
like i said, depends on your sketch. can you give us an example ? code or screenshot maybe ?
It will capture the drawings only between the beginRecord and the endRecord, the previous drawings are ignored.
And creating PDF is memory intensive, so if you put lot of drawings, you might get that error. You can change the memory settings in Processing's Preferences, but as Cedric said, some kinds of drawing are better in bitmap mode: I saw some generated PDFs which were rather small in size but were able to put the PDF reader on its knees...