Saving very large images with PGraphics
in
Programming Questions
•
2 years ago
Hi all,
I've spent quite a bit of time digging around, trying to find a way to export very large images (in this case, about 1200 x 500,000,000 px). Ultimately, this will be a printed image.
PGraphics seems the best option for offscreen drawing, and I've gotten my sketch to save when running smaller images. However, it runs out of memory at about 1200 x 20,000 px - far too small for this particular project.
I looked at the TileSaver but it seems to only be for high-res images of small OpenGL images.
Any suggestions for offscreen rendering, or a way to spit out lots of smaller .tif or .png files and stitch them together (this option need not be stitched in Processing, but would likely need to be automated rather than in Photoshop by hand).
Here's the code.
Thanks! Thanks!
- - -
PS: As a side note for those wondering why anyone would want to create a 500-million pixel long image, the code visualizes every unique combination of the 12 notes from the Nokia Tune ringtone. This is the most ubiquitous piece of music in existence, heard 20k times per second around the world.
I've spent quite a bit of time digging around, trying to find a way to export very large images (in this case, about 1200 x 500,000,000 px). Ultimately, this will be a printed image.
PGraphics seems the best option for offscreen drawing, and I've gotten my sketch to save when running smaller images. However, it runs out of memory at about 1200 x 20,000 px - far too small for this particular project.
I looked at the TileSaver but it seems to only be for high-res images of small OpenGL images.
Any suggestions for offscreen rendering, or a way to spit out lots of smaller .tif or .png files and stitch them together (this option need not be stitched in Processing, but would likely need to be automated rather than in Photoshop by hand).
Here's the code.
Thanks! Thanks!
- - -
PS: As a side note for those wondering why anyone would want to create a 500-million pixel long image, the code visualizes every unique combination of the 12 notes from the Nokia Tune ringtone. This is the most ubiquitous piece of music in existence, heard 20k times per second around the world.
1