@kidswong999 我打开jpg文件时,提醒我“OSError:Unsupported format”,连jpg文件都打不开
G
gnh2
@gnh2
0
声望
5
楼层
266
资料浏览
0
粉丝
0
关注
gnh2 发布的帖子
-
RE: OSError:Assertion failed
-
RE: OSError:Assertion failed
@kidswong999 而且我用os.listdir函数打印出当前文件夹里的文件信息,也是有1.bmp文件的。
-
OSError:Assertion failed
# Copy image to framebuffer. # # This example shows how to load and copy an image to framebuffer for testing. import sensor, image, time # Still need to init sensor sensor.reset() # Set sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) # Set sensor pixel format sensor.set_framesize(sensor.QQVGA) sensor.set_pixformat(sensor.GRAYSCALE) # Load image img = image.Image("/1.bmp", copy_to_fb=True) # Add drawing code here. # img.draw_line(...) # Flush FB sensor.flush() # Add a small delay to allow the IDE to read the flushed image. time.sleep(100)
运行例程03-Drawing-image_drawing.py,提示这个错误,不知道是为什么,是不是IDE的问题