Loading large images using PImage
in
Programming Questions
•
2 years ago
Hello everyone,
I'm a new user of processing. I tried to find the answer to my question in the forum but I was not able to.
I will try to expose clearly what I'm trying to do:
Inputs of my program are:
- a canvas expressed in a file and loaded as a matrix (2 dimensional array) each cell contains 0 or 1. Each cell will be 180x180 pixel wide in the final image. The canvas contains 888 '1'.
- a small image (180x180 pixels) as a png file because of transparency needs
- a background image (the large one, could be 6000x9000 pixel or bigger) as a jpg file
What I would like to get as output is the background image with the small image printed everywhere the canvas contains a '1'.
The goal is to print a 180 pdi image with a shape depending on the original canvas. So can be diffrent but it will end up being a 1500x1000mm picture approximately. So a big image. I'm not trying to display it just to dump it into a file.
My problem is that I'm not able to load the background image using PImage. I tried to increase the memory in the preference up to 2018Mo (more does not work on my laptop with 4Go of Ram).
Any idea of how I should manage that?
Thank you for your help
I'm a new user of processing. I tried to find the answer to my question in the forum but I was not able to.
I will try to expose clearly what I'm trying to do:
Inputs of my program are:
- a canvas expressed in a file and loaded as a matrix (2 dimensional array) each cell contains 0 or 1. Each cell will be 180x180 pixel wide in the final image. The canvas contains 888 '1'.
- a small image (180x180 pixels) as a png file because of transparency needs
- a background image (the large one, could be 6000x9000 pixel or bigger) as a jpg file
What I would like to get as output is the background image with the small image printed everywhere the canvas contains a '1'.
The goal is to print a 180 pdi image with a shape depending on the original canvas. So can be diffrent but it will end up being a 1500x1000mm picture approximately. So a big image. I'm not trying to display it just to dump it into a file.
My problem is that I'm not able to load the background image using PImage. I tried to increase the memory in the preference up to 2018Mo (more does not work on my laptop with 4Go of Ram).
Any idea of how I should manage that?
Thank you for your help
1