Search code examples
pythonpython-3.xarcade

I'm trying to display an image in arcade python, why is it not working?


width = 1400
height = 950
arcade_title = "r/pics"

arcade.open_window(width, height, arcade_title)

arcade.set_background_color(arcade.color.WHITE)
img = arcade.load_texture('google.jpeg')
arcade.draw_texture_rectangle (700, 475, 700, 700, img)

arcade.start_render()

arcade.finish_render()

arcade.run()

This is my code. When i run it no image is displayed. The window just stays white.


Solution

  • Quick edit worked for me (as I stated in my comment):

    width = 1400
    height = 950
    arcade_title = "r/pics"
    
    arcade.open_window(width, height, arcade_title)
    
    arcade.start_render()
    
    arcade.set_background_color(arcade.color.WHITE)
    img = arcade.load_texture('google.jpeg')
    arcade.draw_texture_rectangle (700, 475, 700, 700, img)
    
    arcade.finish_render()
    
    arcade.run()