# Problems with framerate and loading pictures

**URL:** https://discourse.processing.org/t/problems-with-framerate-and-loading-pictures/9670
**Category:** Coding Questions
**Tags:** homework
**Created:** [March 27, 2019, 8:01am UTC](https://discourse.processing.org/t/problems-with-framerate-and-loading-pictures/9670 "2019-03-27T08:01:35Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [March 27, 2019, 8:42am UTC](https://discourse.processing.org/t/problems-with-framerate-and-loading-pictures/9670/5 "2019-03-27T08:42:23Z")

</div>

regarding your example, what is much shorter now,  
but still not PASTE into

```auto
</> code tag

```

pls. repair that in your above post!

* * *

as you removed the text output, how did the frameRate change?  
also make more tests ( to get a feeling what is COSTLY )

- not use fullscreen
- use image only with 3 parameter , not 5  
the image resize 60 times per sec is the wrong way.  
resize them in setup?? and in draw just show them

```auto
image(img,x,y);

```

* * *

here my test with fps log regarding

- full screen or 800,800
- image resize or not

```auto
// https://discourse.processing.org/t/problems-with-framerate-and-loading-pictures/9670

PImage img1, img2;

void setup() {
  //fullScreen();
  size(800,800);
  img1=loadImage("moonwalk.jpg");
  img2=loadImage("moonwalk.jpg");
}

void draw() {
  background(0);
  if (frameCount< 420) image(img1, width/2, 40, width/2, height/2); //full: 6 fps // 12fps
  if (frameCount==420) println("not use image resize");
  if (frameCount> 420) image(img2, width/2, 300); //full: 12 fps // 36fps
  fill(255);
  text(nf(frameRate,1,1)+" fps",width-100,20);
}

```

this test ‘here’ ( on my 40$ computer ) shows extreme values,  
but good for learning.

as if we use your example code only,  
what shows one picture, and later a other, the FPS

> does not make any difference

or you complain?

> with the low and varying fps the timing of your code not work as planned?

well, not forget that we show you some time ago better ways to build a timer  
( what use millis() and not frameCount )  
[Help with delay/millis without influencing the framerate - #2 by kll](https://discourse.processing.org/t/help-with-delay-millis-without-influencing-the-framerate/8153/2) !

---

_[View the full topic](https://discourse.processing.org/t/problems-with-framerate-and-loading-pictures/9670)._
