Navigation

    LILYGO

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    create c code for T-QT Pro img/logo

    Common problems
    3
    7
    592
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bobbycharles last edited by

      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?

      B 1 Reply Last reply Reply Quote 0
      • B
        bobbycharles @bobbycharles last edited by

        see img,
        Screenshot 2023-01-04 at 16.52.51.png

        teastain 1 Reply Last reply Reply Quote 0
        • teastain
          teastain @bobbycharles last edited by

          @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 bytes

          This 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

          B 1 Reply Last reply Reply Quote 0
          • B
            bobbycharles @teastain last edited by

            @teastain

            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?

            teastain 1 Reply Last reply Reply Quote 0
            • teastain
              teastain @bobbycharles last edited by

              @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

              1 Reply Last reply Reply Quote 0
              • T
                tavdog last edited by

                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.
                alt text

                teastain 1 Reply Last reply Reply Quote 0
                • teastain
                  teastain @tavdog last edited by teastain

                  @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 !IMG_5776 2.JPG
                  point is that blue came out blue and red is red!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB | Contributors