# Hello! can someone help me with big image in P3D?

**URL:** <https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802>\
**Category:** Coding Questions\
**Created:** [April 15, 2020, 2:42pm UTC](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802 "2020-04-15T14:42:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vargas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/vargas/32/8837_2.png) [@vargas](https://discourse.processing.org/u/vargas)\
**Post date:** [April 15, 2020, 2:42pm UTC](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802/1 "2020-04-15T14:42:02Z")

</div>

I’m writing code using P3D, but I can’t save a file larger than 48cm wide by 30cm high. can someone help me save images in large sizes?

Like this:

```auto
PImage nome;
float angle;
void setup(){
  size(600,600,P3D);
  background(0);

  nome = loadImage("ffff.png");

  
}

void draw(){
  background(0);
  noStroke();
  
  float da = (float)frameCount/3.0;
  
  float s = 25;
  for(float x = 0;x<=width;x+=s){
    for(float y= 0;y<=height;y+=s){
      pushMatrix();
        
        float f = radians(pmouseY + pmouseY);
        float f2 = radians(pmouseX + pmouseX);
        f = map(f, -1,1,0,255); //texto??
        fill(f,f);
        
        translate(x,y,x);
       
        rotateY(f); 
        rotateX(f2);
        image(nome, 0,0);
        
        popMatrix();
        

    }
      

  
  }
  saveFrame("output/obra_####.png");
}

```

---

<div class="post-metadata">

**Author:** ![megarou](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@megarou](https://discourse.processing.org/u/megarou)\
**Post date:** [April 17, 2020, 12:59am UTC](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802/2 "2020-04-17T00:59:08Z")

</div>

did you try to scale it??, try scale();, if i understand you correctly.  
pushMatrix();  
float f = radians(pmouseY + pmouseY);  
float f2 = radians(pmouseX + pmouseX);  
f = map(f, -1,1,0,255); //texto??  
fill(f,f);

```
    translate(x,y,x);
   
    rotateY(f); 
    rotateX(f2);
   scale(0.9);
    image(nome, 0,0);
    
    popMatrix();
```

---

<div class="post-metadata">

**Author:** ![vargas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/vargas/32/8837_2.png) [@vargas](https://discourse.processing.org/u/vargas)\
**Post date:** [April 17, 2020, 2:46pm UTC](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802/3 "2020-04-17T14:46:42Z")

</div>

Thanks for your help. But my problem is another. I cannot save large images. If I increase the size, for example: ‘’‘size (2600,2800, P3D);’’’ , the player disappears from the screen and the saved image is mostly black.  
I need to save images using P3D in large sizes.

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [April 17, 2020, 2:51pm UTC](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802/4 "2020-04-17T14:51:45Z")

</div>

Use an offscreen PGraphics and do all drawing to that / saving from that. Then draw it scaled down to screen if you want to see it. See [https://processing.org/reference/PGraphics.html](https://processing.org/reference/PGraphics.html)

Make sure to use `createGraphics(2600,2800,P3D);` or the offscreen will be Java2D.

---

<div class="post-metadata">

**Author:** ![vargas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/vargas/32/8837_2.png) [@vargas](https://discourse.processing.org/u/vargas)\
**Post date:** [April 17, 2020, 5:06pm UTC](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802/5 "2020-04-17T17:06:18Z")

</div>

Thanks a lot Neil, but still I don’t know how to do what you suggest, I tried following the script [https://processing.org/reference/PGraphics.html](https://processing.org/reference/PGraphics.html) but it didn’t work out.  
Could you show me more specifically how to do this?
