create c code for T-QT Pro img/logo
-
please explain how you are creating your c code for the logo img.
i have tried multiple sources to get code and i cannot get the colour to be correct.
how did you create your c code logo in the examples ?
what did you use?
what settings? -
see img,
-
@bobbycharleshEreswhat I use to create my "HotHead" image:
// Generated by : ImageConverter 565 Online
//http://www.rinkydinkelectronics.com/t_imageconverter565.php
//I recommend 170X170 or less as needed for proportion
//select output as .c file and change to .h
// Generated from : hothead.jpg
// Time generated : Sat, 01 Oct 22 00:53:37 +0200 (Server timezone: CET)
// Image Size : h155 x v170 pixels (vertical max170!!!)
// Memory usage : 52700 bytesThis is for T-Display S3, tho.
From my GitHub repository:
https://github.com/teastainGit/LilyGO-T-display-S3-setup-and-examples/blob/main/HotHead/hothead.h -
I GOT IT,looking at your code in hothead.ino you set
tft.setSwapBytes(true);
from this function
/*************************************************************************************** ** Function name: setSwapBytes ** Description: Used by 16 bit pushImage() to swap byte order in colours ***************************************************************************************/ void TFT_eSPI::setSwapBytes(bool swap) { _swapBytes = swap; }
it works now thanks,
althought if you could explain why i need this id like that as the original image worked,whats the difference how would i go about creating an image without needing to use the swap bytes fucntion?
whats the difference?
-
@bobbycharles
So glad to hear that you got it running!!!
I had a lot of trouble getting my T-Display S3 working, with no support from LilyGO, so I started my Repository.
Swapbytes is a very technical subject, think of it as "inverse polarity" that creates a negative image.
(It is actually Little Endian vs. Big Endian byte order)
Cheers, Terry -
I can't get the colors right. It seems red and blue are always swapped no matter which utility I use to create the C file. changing swapBytes doesn't work either.
-
@tavdog I saw Mickey closed your issue in LilyGO T-Display S3 repository ?
This is confusing because swap bytes is much like reversing a film negative in that it should change radically with swap bytes true or false.
Did you checkout my LilyGO T-Display S3 repository ?
[edit] I just did this test of your image on my LilyGO T-Display S3 !
point is that blue came out blue and red is red!