# Image save is too slow

**URL:** <https://forums.openmv.io/t/image-save-is-too-slow/8949>\
**Category:** OpenMV Boards\
**Created:** [November 19, 2023, 2:02am UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949 "2023-11-19T02:02:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![paris](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@paris](https://forums.openmv.io/u/paris)\
**Post date:** [November 19, 2023, 2:02am UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949/1 "2023-11-19T02:02:34Z")

</div>

Hi, we are using openmv H7 plus board. We try to save 1600\*1200 image into flash with BMP format since we don’t want to compress it. The image save process is too slow (about 40 seconds). But as the spec mentioned, the flash has a 100MB/s bandwidth, so it should be very fast for this kind of the image save.

---

<div class="post-metadata">

**Author:** ![paris](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@paris](https://forums.openmv.io/u/paris)\
**Post date:** [November 19, 2023, 2:02am UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949/2 "2023-11-19T02:02:54Z")

</div>

import sensor, image, time,pyb

sensor.reset()  
sensor.set\_pixformat(sensor.RGB565)  
sensor.set\_framesize(sensor.UXGA)  
sensor.skip\_frames(time = 2000)

clock = time.clock()  
delay = pyb.millis()  
print(delay)  
img = sensor.snapshot() #sensorctl.sensorCapture()  
img.save(‘r1.bmp’)  
delay = pyb.millis() - delay  
print(delay)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [November 19, 2023, 2:53am UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949/3 "2023-11-19T02:53:31Z")

</div>

Please use an SD card. The internal flash on the camera is very slow for writing data to it. The read speed is very fast but the write speed is very, very slow. This is standard for flash parts as they are primarily for storing firmware images.

(Note, it’s not the write speed but the erase time per sector on the flash. If you look at the datasheet it’s quite high).

---

<div class="post-metadata">

**Author:** ![paris](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@paris](https://forums.openmv.io/u/paris)\
**Post date:** [November 20, 2023, 12:41pm UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949/4 "2023-11-20T12:41:40Z")

</div>

OK, thanks for you quick response. And how about JPG file? I try to save QVGA image with high JPG quality. But if I set the compress quality to more than 60, then always get the system crash and reboot.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [November 20, 2023, 2:38pm UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949/5 "2023-11-20T14:38:29Z")

</div>

There should be space on the disk… so, it shouldn’t crash if you just save one image. How many images are you saving though?

---

<div class="post-metadata">

**Author:** ![paris](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@paris](https://forums.openmv.io/u/paris)\
**Post date:** [November 21, 2023, 12:56am UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949/6 "2023-11-21T00:56:57Z")

</div>

I try to save 6 images with 1600\*1200 and high jpg quality (\> 60) then send them to a network space. Is there any way to implement that?

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [November 21, 2023, 2:21am UTC](https://forums.openmv.io/t/image-save-is-too-slow/8949/7 "2023-11-21T02:21:50Z")

</div>

You can use the ImageIO module to save images in RAM. Or, use an SD card and save them to that disk. The QSPI flash is really for read only things.
