# Building application that uses image files

**URL:** <https://discourse.processing.org/t/building-application-that-uses-image-files/19444>\
**Category:** Processing\
**Created:** [April 5, 2020, 6:25pm UTC](https://discourse.processing.org/t/building-application-that-uses-image-files/19444 "2020-04-05T18:25:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@Nino](https://discourse.processing.org/u/Nino)\
**Post date:** [April 5, 2020, 6:25pm UTC](https://discourse.processing.org/t/building-application-that-uses-image-files/19444/1 "2020-04-05T18:25:34Z")

</div>

So I’m making a small game that uses images located in the folder of the processing files. In the editor it runs without any issues. however when i build it for Windows the aplication starts but is blank. Nothing is showing up (Not the images but also not the rest of the coded visuals). I tried to build a different application without images this works perfect.

So my question is how can you include images in a build? (I’m assuming the images are the problem).  
Right now I load them like this:

PImage = img;  
img = loadImage(“player.png”);  
image(img,x,y);

Is there a different way to do this that doesn’t conflict with building?

---

<div class="post-metadata">

**Author:** ![paulstgeorge](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Post date:** [April 5, 2020, 7:47pm UTC](https://discourse.processing.org/t/building-application-that-uses-image-files/19444/2 "2020-04-05T19:47:43Z")

</div>

By ‘build’, do you mean ‘export application’? Do you have the images in a folder called ‘data’?  
If you check that data folder of images is included in the application folder then it should work.

```auto

```

```auto
PImage img;

void setup() {
  size(800,480);
  img = loadImage("data/image0001.png"); 
}

void draw() {
  image(img, 0, 0);
}

```

```auto

```

---

<div class="post-metadata">

**Author:** ![Nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@Nino](https://discourse.processing.org/u/Nino)\
**Post date:** [April 5, 2020, 8:29pm UTC](https://discourse.processing.org/t/building-application-that-uses-image-files/19444/3 "2020-04-05T20:29:50Z")

</div>

Ah that was the issue I had the images stored in the same folder as the processing files. Adding a data folder and inserting the images in there did the trick! Thanks a lot!

Edit: ah yes with “building” I did mean export application, I’m mixing up some terms from different programs I use
