I have a Arduino Uno with a 2.4" TFT display.
Is it possible to reverse the image in a mirror config?
Reverse images.
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Reverse images.
In theory, sure. I don't think we have a function in the library to do it though.
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Reverse images.
The GFX library handles rotation but not mirroring. If you want to try adding it, look in the drawPixel() function in the device-specific library (not Adafruit_GFX, but the second, hardware-specific library for the LCD).
-
- Posts: 2
- Joined: Fri Feb 21, 2014 9:15 pm
Re: Reverse images.
First off I must confess that I am new to all of this and am diving head long into a HUD project... (Best way to learn right?) And I could use some help with something which I'm sure is very easy to some but is frustrating me to no end.
Additionally I have tried changing the code in the getRoatation() section of the cpp file with the same outcome as above.
I have a SSD1306. I have seen your post on another thread (http://forums.adafruit.com/viewtopic.ph ... ip#p209517) .... and did as you suggested while also using the text portion of the example code only. (Other shapes and such removed from code.) It works fine for setTextsize(1) but that is much too small for my particular project and if I change the size to anything but 1 it goes back to normal. Is there something that I am missing here? Any help would be greatly appreciated.pburgess wrote:The GFX library handles rotation but not mirroring. If you want to try adding it, look in the drawPixel() function in the device-specific library (not Adafruit_GFX, but the second, hardware-specific library for the LCD).
Additionally I have tried changing the code in the getRoatation() section of the cpp file with the same outcome as above.
-
- Posts: 2
- Joined: Fri Feb 21, 2014 9:15 pm
Re: Reverse images.
OK so as usual after I finally give up and ask for help I figured it out...
So I will post here for anyone else wanting to do this sort of thing. Just make sure you make a safe copy of the file first in case something should go wrong...(saves a download anyway )
No mods to the Adafruit_SSD1306.cpp file that I described above.
In the Adafruit_SSD1306.h file look for the lines:
#define SSD1306_COMSCANINC 0xC0
#define SSD1306_COMSCANDEC 0xC8
Change these lines to say:
#define SSD1306_COMSCANINC 0xC8
#define SSD1306_COMSCANDEC 0xC0
This reverses the display over the Y axis (would have liked to reverse over X so any further help would be appreciated... but since I am so early in the process the design can be adjusted for this.)
Hope this helps anyone in the future looking to do this kind of change.
If anyone has any suggestions as to how to do this in code or to flip it over the X axis that would be awesome and possibly save a lot of headaches for others.
Thanks!!
So I will post here for anyone else wanting to do this sort of thing. Just make sure you make a safe copy of the file first in case something should go wrong...(saves a download anyway )
No mods to the Adafruit_SSD1306.cpp file that I described above.
In the Adafruit_SSD1306.h file look for the lines:
#define SSD1306_COMSCANINC 0xC0
#define SSD1306_COMSCANDEC 0xC8
Change these lines to say:
#define SSD1306_COMSCANINC 0xC8
#define SSD1306_COMSCANDEC 0xC0
This reverses the display over the Y axis (would have liked to reverse over X so any further help would be appreciated... but since I am so early in the process the design can be adjusted for this.)
Hope this helps anyone in the future looking to do this kind of change.
If anyone has any suggestions as to how to do this in code or to flip it over the X axis that would be awesome and possibly save a lot of headaches for others.
Thanks!!
Please be positive and constructive with your questions and comments.