# Waveshare Image Display

I'm trying to have a jpeg image I've downloaded displayed on a screen. I'm executing the below code on a raspberry pi that'll display the shapes & image on a waveshare display. For the life of me, I can't figure this one out. For example, I've looked into the PIL library, but that's only for Windows. I've tried editing the below code. That also doesn't work. I'd greatly appreciate any code that'll help me display a jpeg image. Thank you.

``````import epd7in5b
import Image
import ImageDraw
import ImageFont
#import imagedata

EPD_WIDTH = 640
EPD_HEIGHT = 384

def main():
epd = epd7in5b.EPD()
epd.init()

# For simplicity, the arguments are explicit numerical coordinates
image = Image.new('L', (EPD_WIDTH, EPD_HEIGHT), 255)    # 255: clear the frame
draw = ImageDraw.Draw(image)
font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf', 24)
draw.rectangle((0, 6, 640, 40), fill = 127)
draw.text((200, 10), 'UNIT INFORMATION', font = font, fill = 255)
draw.rectangle((200, 80, 600, 280), fill = 127)
draw.chord((240, 120, 580, 220), 0, 360, fill = 255)
draw.rectangle((20, 80, 160, 280), fill = 0)
draw.chord((40, 80, 180, 220), 0, 360, fill = 127)
epd.display_frame(epd.get_frame_buffer(image))

image = Image.open('uno.bmp')
epd.display_frame(epd.get_frame_buffer(image))

# You can get frame buffer from an image or import the buffer directly:
#epd.display_frame(imagedata.MONOCOLOR_BITMAP)

if __name__ == '__main__':
main()
``````
• What specific error do you get with this code? Feb 6, 2018 at 17:42

``````from appJar import gui
{"ft_lang_label":"__label__en","ft_lang_prob":0.5985087,"math_prob":0.811578,"size":1440,"snap":"2023-40-2023-50","text_gpt3_token_len":427,"char_repetition_ratio":0.1253482,"word_repetition_ratio":0.010050251,"special_character_ratio":0.33888888,"punctuation_ratio":0.2320819,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9541412,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-05T13:06:09Z\",\"WARC-Record-ID\":\"<urn:uuid:bdf6f09f-72ca-4fa6-a2b8-c89f5e8fc37e>\",\"Content-Length\":\"157528\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d61f27f8-15ed-4654-95c7-b6816a9bf9f1>\",\"WARC-Concurrent-To\":\"<urn:uuid:093c6198-076b-491a-b512-acb196104df9>\",\"WARC-IP-Address\":\"104.18.43.226\",\"WARC-Target-URI\":\"https://raspberrypi.stackexchange.com/questions/78885/waveshare-image-display\",\"WARC-Payload-Digest\":\"sha1:HUGYYSZKRRV6UYPB2LSMGWDB225Z5BU3\",\"WARC-Block-Digest\":\"sha1:ZLUKI3TY4KNCV232IML2XW6FABCDUWOX\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100551.17_warc_CC-MAIN-20231205105136-20231205135136-00844.warc.gz\"}"}