# SaveFrame creating double sized images

**URL:** <https://discourse.processing.org/t/saveframe-creating-double-sized-images/46680>\
**Category:** Libraries\
**Created:** [July 8, 2025, 7:05am UTC](https://discourse.processing.org/t/saveframe-creating-double-sized-images/46680 "2025-07-08T07:05:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timesuptim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/timesuptim/32/20893_2.png) [@timesuptim](https://discourse.processing.org/u/timesuptim)\
**Post date:** [July 8, 2025, 7:05am UTC](https://discourse.processing.org/t/saveframe-creating-double-sized-images/46680/1 "2025-07-08T07:05:39Z")

</div>

Hello all,  
I am using Processing to make videos. Every frame is saved with the draw() function. For some reason, the frames being saved are twice the size of the screen. I set screen size with  
size(1680,1050);  
and then check it with  
println("screen width “+width+” and height "+height);  
however the PNGs that are saved are all 3360x2200 pixels.

Any idea what I need to do? Any one else have this issue? I am using version 4.4.4 if that matters.  
For one of the videos, I just made everything half size because that was easy. This one has a bit more graphic “design” in it so I would like to avoid having to re-calculate all the sizes if I can.  
Best,  
Tim

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 8, 2025, 4:03pm UTC](https://discourse.processing.org/t/saveframe-creating-double-sized-images/46680/2 "2025-07-08T16:03:20Z")

</div>

Hello @timesuptim ,

Try setting this and report back:

`pixelDensity(1);`

> **[pixelDensity() / Reference](https://processing.org/reference/pixeldensity_)**
>
> This function makes it possible to render using all the pixels on high resolutions screens like Apple Retina and Windows HiDPI. This function can only be run once within a program, and must be called …

One of many topics that this has solved:

> [@Background image doesn't load](https://discourse.processing.org/t/background-image-doesnt-load/46654/3):
>
> Hello glv Setting the pixelDensity to 1 solved the problem. println (width, height); gives me 1000 1000 Thanks for helping me out!

`:)`

---

<div class="post-metadata">

**Author:** ![timesuptim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/timesuptim/32/20893_2.png) [@timesuptim](https://discourse.processing.org/u/timesuptim)\
**Post date:** [July 8, 2025, 5:55pm UTC](https://discourse.processing.org/t/saveframe-creating-double-sized-images/46680/3 "2025-07-08T17:55:25Z")

</div>

Bingo, that was it.  
No idea how that would get changed. But now the program makes images in the correct format. And it is lightning fast compared to how it was running before.  
Thank you.
