Skip to content
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

DisplayImageFromWeb example doesn't work with JPEGDEC 1.2.2+ #11

Open
joelhaasnoot opened this issue Dec 12, 2021 · 3 comments
Open

DisplayImageFromWeb example doesn't work with JPEGDEC 1.2.2+ #11

joelhaasnoot opened this issue Dec 12, 2021 · 3 comments

Comments

@joelhaasnoot
Copy link

Tested to work with

1.1.1
1.2.0
1.2.1

Error with 1.2.2+ is

invalid conversion from 'void (*)(JPEGDRAW*)' {aka 'void (*)(jpeg_draw_tag*)'} to 'int (*)(JPEGDRAW*)' {aka 'int (*)(jpeg_draw_tag*)'} [-fpermissive]
@brianlich
Copy link

I was able to get around the error above by modifying the following in code.

int JPEGDraw(JPEGDRAW *pDraw)
{
  // Stop further decoding as image is running off bottom of screen
  if (  pDraw->y >= dma_display->height() ){
    return 0;
  }

  dma_display->drawRGBBitmap(pDraw->x, pDraw->y, pDraw->pPixels, pDraw->iWidth, pDraw->iHeight);

  return 1;
}

However, I'm getting a new error now that looks be in the JPEGDEC library. Any ideas? I'm using PlatformIO.

In file included from src/main.cpp:47:
.pio/libdeps/wemos_d1_mini32/JPEGDEC/src/JPEGDEC.h:216:14: error: 'File' has not been declared
     int open(File &file, JPEG_DRAW_CALLBACK *pfnDraw);
              ^~~~

@clajarac
Copy link

clajarac commented Sep 6, 2023

did you fix it? same problem here

@hpsaturn
Copy link

hpsaturn commented Oct 4, 2023

I had the same issue:

In file included from src/main.cpp:47:
.pio/libdeps/wemos_d1_mini32/JPEGDEC/src/JPEGDEC.h:216:14: error: 'File' has not been declared
int open(File &file, JPEG_DRAW_CALLBACK *pfnDraw);
^~~~

I'm using a TFT_eSPI library, and disabling the SMOOTH_FONT in the TFT Setup I fixed it. Maybe could have relation with your issue.

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

No branches or pull requests

4 participants