# Image copy between extra framebuffers regardless of pixelformat or framesize

**URL:** <https://forums.openmv.io/t/image-copy-between-extra-framebuffers-regardless-of-pixelformat-or-framesize/9995>\
**Category:** OpenMV Boards\
**Created:** [September 6, 2024, 9:07am UTC](https://forums.openmv.io/t/image-copy-between-extra-framebuffers-regardless-of-pixelformat-or-framesize/9995 "2024-09-06T09:07:05Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [September 10, 2024, 5:51pm UTC](https://forums.openmv.io/t/image-copy-between-extra-framebuffers-regardless-of-pixelformat-or-framesize/9995/9 "2024-09-10T17:51:27Z")

</div>

I get 40 FPS with RGB565 VGA with this on the H7 Plus:

```auto
# Untitled - By: kwagy - Tue Sep 10 2024

import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.VGA)
sensor.skip_frames(time = 2000)

clock = time.clock()

fb0 = sensor.alloc_extra_fb(sensor.width(), sensor.height(), sensor.RGB565)
fb1 = sensor.alloc_extra_fb(sensor.width(), sensor.height(), sensor.RGB565)

i = 0
fbs = [fb0, fb1]
fbs[i].replace(sensor.snapshot())
i = i ^ 1

while(True):
    clock.tick()
    img = sensor.snapshot()
    start = time.ticks_us()
    fbs[i].replace(img)
    i = i ^ 1
    img.difference(fbs[i])
    print(clock.fps(), time.ticks_diff(time.ticks_us(), start))

```

40.3264 19640

Looks like the overhead of the processing is 20ms.

---

_[View the full topic](https://forums.openmv.io/t/image-copy-between-extra-framebuffers-regardless-of-pixelformat-or-framesize/9995)._
