Quantcast
Channel: MicroPython Forum (Archive)
Viewing all articles
Browse latest Browse all 40

ESP32 boards • Re: Waveshare e-paper display how to rotate?

$
0
0
???
Sorry but, I really couldn't understand this thread.
Rotating a frame buffer is as simple as (or I am missing something?):

CODE:

import framebufdef bufrotate(fb, w, h, defaultcolor=1):    rotatebuf = bytearray(w * h // 8)    rotatefb = framebuf.FrameBuffer(rotatebuf, h, w, framebuf.MONO_HLSB)    for x in range(h):        for y in range(w):             rotatefb.pixel(x,y, fb.pixel(w-1-y,x))    return rotatebuf
Long time no see... what happened to this glorious forum? Did we really need to migrate the whole community on github? Just saying...

Statistics: Posted by ernitron — Sat Dec 23, 2023 10:45 am



Viewing all articles
Browse latest Browse all 40

Trending Articles