Skip to content

esp32 cam and ST7789V #874

Dec 20, 2020 · 4 comments · 4 replies

You must be logged in to vote

The problem is in the TFT_eFEX library, when it decodes the jpeg it appears to be corrupting the offset value for some reason.

I would use my TJpg_Decoder and do not load TFT_eFEX. There are examples with that library. The key additions to your sketch are a rendering function:

bool tft_output(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t* bitmap)
{
   // Stop further decoding as image is running off bottom of screen
  if ( y >= tft.height() ) return 0;

  // This function will clip the image block rendering automatically at the TFT boundaries
  tft.pushImage(x, y, w, h, bitmap);

  // Return 1 to decode next block
  return 1;
}

A few lines in setup:

  TJpgDec.setSwapBytes(true);…

Replies: 4 comments 4 replies

You must be logged in to vote
0 replies

You must be logged in to vote
1 reply
@Krumpytail

You must be logged in to vote
3 replies
@Krumpytail

@Krumpytail

@Bodmer

Answer selected by Krumpytail

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants