We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › 2D rendering of large images for print
Page Index Toggle Pages: 1
2D rendering of large images for print (Read 895 times)
2D rendering of large images for print
Apr 21st, 2010, 7:05pm
 
I have been searching and testing several methods for rendering large images for awhile but am having trouble finding a reliable solution.

I have tried the following scenarios:

1. The TileSaver library code. It doesn’t work in v1.0x I guess and it only seems to be for OpenGL, which I am not using.
http://processing.org/discourse/yabb2/num_1248245155.html

2. The PDF export library. This seems to generate very large pdfs that are difficult to open and work with. They also have trouble capturing alot of sketch content.

3. Setting the size() to something very large. This is not desirable because I can’t actually see what I am doing in the sketch. My process for image creation involves drawing within the sketch to create the image.

What I am looking for is a simple way to have a sketch of a certain “working” size (1027 x 768, 640x 480, etc.) so I can see what I am creating and a “rendered” size that is a multiple of the “working” size, ex 5x larger than 1024x768 would be 5120 x 3840. I also want to be able to export the image at a high dpi for print, say 300 dpi.

Has anyone out there been able to do something like this in the most recent version of processing I am using V1.1 at the moment on OSX 10.6.3. I would greatly appreciate any help on this.

Thanks in advance Smiley  
Re: 2D rendering of large images for print
Reply #1 - Apr 22nd, 2010, 1:02am
 
Make all your sketch to depend on width and height variables, so when you scale it up, it will draw identically at a larger scale.
You can also use the scale() function, although the result can be different.
Re: 2D rendering of large images for print
Reply #2 - Apr 22nd, 2010, 8:43am
 
The issue I have with doing this is that the image created at the smaller "working" scale is unique to that instance of the applet running. I essentially am creating what the image looks like in that run. This means it won't be drawn the same every time. I see how this would be great if it was  a situation where the exact same thing is drawn each time the sketch is run.

Any other ideas out there?
thanks
Re: 2D rendering of large images for print
Reply #3 - Apr 22nd, 2010, 9:00am
 
Same advice, but duplicate all drawing operations to an off-screen PGraphics, a larger one, and save this one.
Making a custom PGraphics (like RawDXF extends PGraphics3D, PGraphicsPDF extends PGraphicsJava2D, PGraphicsOpenGL extends PGraphics3D and of course PGraphicsJava2D extends PGraphics) can help there.
Re: 2D rendering of large images for print
Reply #4 - Apr 22nd, 2010, 9:43am
 
Thanks for the advice. I think that may work for my situation. I'll post more on this thread as I figure out what works for me. Thanks again! Smiley
Page Index Toggle Pages: 1