Skip to content

Fix image function when display rotated 90 or 270 degrees #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

jsharper
Copy link

@jsharper jsharper commented Sep 7, 2020

I'm not sure if this is the best way or place to fix this. Feel free to close/reject if there's a better way.

Without this change, I was unable to properly use the image function to draw a PIL image when a non-square display was set to 90 or 270 degree rotation. This change allows the passed image to match the effective resolution of the rotated display, allowing the entire image to be displayed (rotated appropriately).

@dhalbert dhalbert requested review from ladyada and makermelissa and removed request for ladyada September 7, 2020 21:06
@dhalbert
Copy link
Contributor

dhalbert commented Sep 7, 2020

Discussion in #help-with-circuitpython 2020-09-07 starting 3:19pm ET.

@jsharper
Copy link
Author

jsharper commented Sep 7, 2020

Note: my development and testing was on a rpi with blinka and some 128x64 SSD1306 OLED displays.

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

@makermelissa makermelissa merged commit 83d24f9 into adafruit:master Sep 10, 2020
@jsharper jsharper deleted the fix/jsharper/image-rotate branch September 10, 2020 17:03
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Sep 11, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90640 to 1.2.0 from 1.1.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_MLX90640#21 from adafruit/fix-pylint
  > Merge pull request adafruit/Adafruit_CircuitPython_MLX90640#18 from fgervais/broken-pixels

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.4.0 from 3.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#83 from cjsieh/scard_vs_sdcardio

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 7.3.0 from 7.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#103 from dhalbert/hci

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_BerryMed_Pulse_Oximeter to 2.0.2 from 2.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_BerryMed_Pulse_Oximeter#4 from dhalbert/up-to-date-data

Updating https://github.com/adafruit/Adafruit_CircuitPython_framebuf to 1.4.1 from 1.3.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_framebuf#35 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_framebuf#34 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_framebuf#33 from jsharper/fix/jsharper/image-rotate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants