-
I have 9000x6000 resolution photos I'm taking with the Arducam 64mp camera on a Rpi4. Earlier I was taking photos via old way
(full script https://github.com/Digital-Naturalism-Laboratories/Mothbox/blob/main/Software/scripts/TakePhoto_HDR.py) and it would save an image that was about 7-10mb each Now (for speed reasons and because I'm bracketing photos), I save my photos in two loops, one to where i capture a request and then save it as a PILimage and append that image to a list, and the second loop to save those images to disk but now all the photos are only like 2-3mb each. and so it seems like a big red flag something is going wrong! Anyone know a better way I can save these images that keeps their full quality? Or maybe my original method was just inefficient? (im guessing not) new way
loop 2 full photo script https://github.com/Digital-Naturalism-Laboratories/Mothbox/blob/main/Software/TakePhoto.py
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok, i think i solved it! and so i changed my line of code to and it seems to be saving normal file sizes. If i crank it to 100, the files sizes get quite big (like 22mb), but 95 seems to be around the same as before. |
Beta Was this translation helpful? Give feedback.
Ok, i think i solved it!
I didn't know the PIL image save feature had a "quality" command, and that the default is low-ish (like 50)
and so i changed my line of code to
img.save(filepath,exif=exif_bytes, quality=95)
and it seems to be saving normal file sizes. If i crank it to 100, the files sizes get quite big (like 22mb), but 95 seems to be around the same as before.