I have a problem with saving a picture in “WQXGA2” resolution in PNG because it doesnt compress the picture file and it shows “RuntimeError: memory allocation failed” even when I use an SD card.
consider that there is no problem when I use the code to save HD picture.
here is the code I use:
import sensor, image, time
sensor.skip_frames(time = 2000)
clock = time.clock()
img = sensor.snapshot()
thanks for helping me.
PNGs are made for computer graphics. Please save using JPG. Yes, this is a bug with the PNG code which is experimental right now. But, you shouldn’t use PNG for anything other than reading image file logos and the like.
I’ll note this as a bug that needs to be fixed.
thanks for your quick answer.
but I need an incompressed picture. jpg format decreases the image files size and compresses it.
as you can see the big squares when you zoom in the image are because of that.
I hope if you could suggest a faster solution for this problem.
Use the bmp file format. Just save with .bmp.
yes that works
thank you alot