# Sensor windowing problem

**URL:** <https://forums.openmv.io/t/sensor-windowing-problem/6246>\
**Category:** OpenMV Boards\
**Created:** [August 21, 2021, 5:32pm UTC](https://forums.openmv.io/t/sensor-windowing-problem/6246 "2021-08-21T17:32:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ulf\_Andersson](https://avatars.discourse-cdn.com/v4/letter/u/c0e974/32.png) [@Ulf\_Andersson](https://forums.openmv.io/u/Ulf_Andersson)\
**Post date:** [August 21, 2021, 5:32pm UTC](https://forums.openmv.io/t/sensor-windowing-problem/6246/1 "2021-08-21T17:32:49Z")

</div>

After updating the firmware and IDE sensor.set\_windowing((213, 133, 213, 213)) don’t work  
It generate: RuntimeError: “Frame size is not supported or is not set.”

sensor.set\_windowing (210, 133, 213, 213) works fine

Board H7 OV5640 Firmware 4.1.0

Se code below  
it seems that x larger than 210 don’t work.

```nohighlight
sensor.reset()             
sensor.set_pixformat(sensor.RGB565)   
sensor.set_framesize(sensor.VGA)    
sensor.skip_frames(time=2000)       
net = "trained.tflite"
time.sleep(2)
labels = [line.rstrip('\n') for line in open("labels.txt")]

clock = time.clock()
area=0
count=0

while(True):
    clock.tick()
    area = area +1
    if area == 1:
         sensor.set_windowing((0, 133, 213, 213))
    if area == 2:
         sensor.set_windowing((213, 133, 213, 213))
    if area == 3:
        sensor.set_windowing((426, 133, 213, 213))

    img = sensor.snapshot()
```

---

<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:** [August 21, 2021, 5:45pm UTC](https://forums.openmv.io/t/sensor-windowing-problem/6246/2 "2021-08-21T17:45:20Z")

</div>

Previous versions of the driver didn’t check DMA buffer line sizes and etc. This is not a bug. The resolution you want to crop to cannot be done. We use hardware acceleration now so the actual pixel line with has some more constraints. Make the width even.
