Skip to content

Commit bd2771c

Browse files
committed
Fixed crash while loading image from microSD card.
1 parent ce2a9cb commit bd2771c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/include/Image.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ bool Image::drawImage(const char *path, int x, int y, bool dither, bool invert)
8585
else
8686
{
8787
if (strstr(path, ".bmp") != NULL || strstr(path, ".dib") != NULL)
88-
return drawBitmapFromWeb(path, x, y, dither, invert);
88+
return drawBitmapFromSd(path, x, y, dither, invert);
8989
if (strstr(path, ".jpg") != NULL || strstr(path, ".jpeg") != NULL)
90-
return drawJpegFromWeb(path, x, y, dither, invert);
90+
return drawJpegFromSd(path, x, y, dither, invert);
9191
if (strstr(path, ".png") != NULL)
92-
return drawPngFromWeb(path, x, y, dither, invert);
92+
return drawPngFromSd(path, x, y, dither, invert);
9393
}
9494
return 0;
9595
};
@@ -200,11 +200,11 @@ bool Image::drawImage(const char *path, const Format &format, const int x, const
200200
else
201201
{
202202
if (format == BMP)
203-
return drawBitmapFromWeb(path, x, y, dither, invert);
203+
return drawBitmapFromSd(path, x, y, dither, invert);
204204
if (format == JPG)
205-
return drawJpegFromWeb(path, x, y, dither, invert);
205+
return drawJpegFromSd(path, x, y, dither, invert);
206206
if (format == PNG)
207-
return drawPngFromWeb(path, x, y, dither, invert);
207+
return drawPngFromSd(path, x, y, dither, invert);
208208
}
209209
return 0;
210210
}

0 commit comments

Comments
 (0)