jezs00 / pycasso

A system to send AI generated art to an E-Paper display through a Raspberry PI unit
MIT License
70 stars 4 forks source link

Rotating screen to portrait #52

Closed djxie2019 closed 1 year ago

djxie2019 commented 1 year ago

With the rotate config setting to "90" I thought I could position the EPD in portrait orientation however crops the image instead. Then thought the in-fill request could fill those but doesn't seem to work. Is there another setting that can fix this to support portrait orientation?

jezs00 commented 1 year ago

Rotate is just a value used by omni-epd for the screen so pycasso doesn't really handle it.

Solution probably could be as simple as:

Also add rotate unit test if implemented

On Fri, 17 Mar 2023, 10:14 pm djxie2019, @.***> wrote:

With the rotate config setting to "90" I thought I could position the EPD in portrait orientation however crops the image instead. Then thought the in-fill request could fill those but doesn't seem to work. Is there another setting that can fix this to support portrait orientation?

— Reply to this email directly, view it on GitHub https://github.com/jezs00/pycasso/issues/52, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUTEK7A4JFG7ZI3EWUOLTRTW4RBSNANCNFSM6AAAAAAV6MUY5A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jezs00 commented 1 year ago

I think this issue is innate to within the omni_epd functionality so for now to work with it, we have a new config variable called image_rotate in [Generation]. This will rotate the dimensions prior to requesting from providers.

djxie2019 commented 1 year ago

Have updated code today and set both the EPD and new Generation rotate settings to 90 degrees however still getting black bars top and bottom in portrait orientation - anything else I need to be setting?

jezs00 commented 1 year ago

Don't set Epd rotate to 90, set it back to 0

On Sat, 25 Mar 2023, 10:27 am djxie2019, @.***> wrote:

Have updated code today and set both the EPD and new Generation rotate settings to 90 degrees however still getting black bars top and bottom in portrait orientation - anything else I need to be setting?

— Reply to this email directly, view it on GitHub https://github.com/jezs00/pycasso/issues/52#issuecomment-1483581742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUTEK7H7I2TJEVXCIH7QRDTW5YUXDANCNFSM6AAAAAAV6MUY5A . You are receiving this because you modified the open/close state.Message ID: @.***>

djxie2019 commented 1 year ago

In that case the image renders as per prior state in landscape orientation. I used option "2 Upgrade pycasso minimally" when updating - do I need to do a full install again?

jezs00 commented 1 year ago

Minimal update should work, but you can try full install if you want. Make sure -

[Display]
rotate = 0

[Generation]
image_rotate = 90
djxie2019 commented 1 year ago

Completed a fresh install, still no luck. In the default config your "image_rotate" has a space before and after the "=" which none of the other parameters have but have tried both ways and still orientating in landscape.

jezs00 commented 1 year ago

Okay this should be fixed now if you update minimally, tested on pi4. Issue was:

djxie2019 commented 1 year ago

Perfect, working now.