Can't rotate image on the LCD shield

I put an older M7 and a LCD shield on my bench for optics experiments.

I would like a 180° rotation on the LCD.

What does work:

  • lcd.write(img, hint=image.HMIRROR)
  • lcd.write(img, hint=image.TRANSPOSE)

What doesn’t work (it has no effect):

  • lcd.write(img, hint=image.VFLIP)
  • lcd = display.SPIDisplay(vflip=True, hmirror=True)

Camera OpenMV M7

  • QRcode number: 8C03001100532
  • Firmware 4.8.1

LCD shield:

  • QRcode number 9515004700169

I would like some hints as for the moment I have to rotate my head to better read the figures displayed on the LCD.

Hi, vflip doesn’t work because it cannot be done using non-triple-buffered mode. lcd.write() for the display driver, when you don’t have enough RAM, just writes out the image line by line. we can only hmirror in this case.

If you want to flip the image, then, you need to do it in ram first:

img.scale(hint=image.VFLIP|image.HMIRROR)

You’ll notice this cost performance and also requires a second buffer in RAM to hold the output image… so, you might get an out of memory error depending on the res.

Thank you for your quick answer.
Indeed it will be tricky.
I just thought I had a usecase for the old M7.