# Couldn't load image into py5

**URL:** https://discourse.processing.org/t/couldnt-load-image-into-py5/38503
**Category:** p5py
**Tags:** homework
**Created:** [August 26, 2022, 11:22pm UTC](https://discourse.processing.org/t/couldnt-load-image-into-py5/38503 "2022-08-26T23:22:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Lyra](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lyra](https://discourse.processing.org/u/Lyra)
#### Post date: [August 26, 2022, 11:22pm UTC](https://discourse.processing.org/t/couldnt-load-image-into-py5/38503/1 "2022-08-26T23:22:37Z")

</div>

Hi, I’m a new user and just begin learning py5 in school, I’ve run the code with no errors appeared, but the sketch is blank, could anyone help me figure out the problem? Thank you so much!

\<

size(600,600)  
background(‘#2d2d2d’)  
#color\_mode(HSB,50)  
#no\_stroke()

tint(random(100),random(100),random(100))  
cat = load\_image(‘C:/Users/lenovo/Downloads/clipart1322749.png’)  
image(cat,0,0)

> 

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/6/7602adee9beb3728fc163c096afe51af7aff73f6.png)

---

<div class="post-metadata">

### Author: ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)
#### Post date: [August 27, 2022, 12:08am UTC](https://discourse.processing.org/t/couldnt-load-image-into-py5/38503/2 "2022-08-27T00:08:46Z")

</div>

Cheers @Lyra!

I find it curious that you don’t seem to get any error message, is that so?

For instance, I get an error message because I don’t have the `lipart1322748.png’ file at the right place…

```auto
The file "C:/Users/lenovo/Downloads/clipart1322749.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
py5 encountered an error in your code:
    3 #color_mode(HSB,50)
    4 #no_stroke()
    5    
    6 tint(random(100),random(100),random(100))
--> 7 cat = load_image('C:/Users/lenovo/Downloads/clipart1322749.png')
    8 image(cat,0,0)

RuntimeError: cannot load image file C:/Users/lenovo/Downloads/clipart1322749.png. error message: either the file cannot be found or the file does not contain valid image data.

```

Otherwise, it I stick my own image, it kind of works… but it got very very dark…

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/0/70af690dcdbb38a09634cf26fd7c9d1e891da763.jpeg)

I wonder if your image is very big and has a plain part in the top left, could it be working but just showing dark gray?

Can you try `image(cat, 0 ,0, width, height)` and turn off the tint line with `#` maybe?

---

<div class="post-metadata">

### Author: ![Lyra](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lyra](https://discourse.processing.org/u/Lyra)
#### Post date: [August 27, 2022, 12:24am UTC](https://discourse.processing.org/t/couldnt-load-image-into-py5/38503/3 "2022-08-27T00:24:07Z")

</div>

Yes, it works!!Thank you so much!!! 😆
