First doublecheck your problem analysis. Is the problem loading the image, displaying the image or not related to the image at all. Use different test-sketches to pinpoint the exact problem. When I make a test sketch I can display 20 images of 10.000x664 pixels at a framerate of 60 fps. So no problem at all.
Test Sketch
If the problem is somehow related to the image, then some suggestions are:
Test Sketch
- PImage test;
- void setup() {
- size(1200, 800);
- test = createImage(10000, 664, RGB);
- test.loadPixels();
- for (int i=0; i<test.pixels.length; i++) {
- test.pixels[i] = color(random(255), random(255), random(255));
- }
- test.updatePixels();
- }
- void draw() {
- background(0);
- for (int i=0; i<20; i++) {
- image(test, random(width), random(height));
- }
- frame.setTitle(int(frameRate) + " fps");
- }
If the problem is somehow related to the image, then some suggestions are:
- Load the image in setup() once. This is not a suggestion, but a requirement!
- Use the OpenGL renderer.
- Divide the image into multiple smaller segments (you can do this in your program) and display the right ones.
- Use a GLSL shader.