Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/include/ImageBMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ bool Image::drawBmpFromWebAtPosition(const char *url, const Position &position,
readBmpHeader(buf, &bmpHeader);

uint16_t posX, posY;
getPointsForPosition(position, bmpHeader.width, bmpHeader.height, E_INK_WIDTH, E_INK_HEIGHT, &posX, &posY);
getPointsForPosition(position, bmpHeader.width, bmpHeader.height, width(), height(), &posX, &posY);
ret = drawBitmapFromBuffer(buf, posX, posY, dither, invert);
free(buf);

Expand Down Expand Up @@ -529,7 +529,7 @@ bool Image::drawBmpFromSdAtPosition(const char *fileName, const Position &positi
memset(ditherBuffer, 0, sizeof ditherBuffer);

uint16_t posX, posY;
getPointsForPosition(position, bmpHeader.width, bmpHeader.height, E_INK_WIDTH, E_INK_HEIGHT, &posX, &posY);
getPointsForPosition(position, bmpHeader.width, bmpHeader.height, width(), height(), &posX, &posY);

for (int i = 0; i < h; ++i)
{
Expand Down
4 changes: 2 additions & 2 deletions src/include/ImageJPEG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ bool Image::drawJpegFromWebAtPosition(const char *url, const Position &position,
}

uint16_t posX, posY;
getPointsForPosition(position, w, h, E_INK_WIDTH, E_INK_HEIGHT, &posX, &posY);
getPointsForPosition(position, w, h, width(), height(), &posX, &posY);

ret = drawJpegFromBuffer(buff, defaultLen, posX, posY, dither, invert);
free(buff);
Expand Down Expand Up @@ -236,7 +236,7 @@ bool Image::drawJpegFromSdAtPosition(const char *fileName, const Position &posit
return 0;
}

getPointsForPosition(position, w, h, E_INK_WIDTH, E_INK_HEIGHT, &posX, &posY);
getPointsForPosition(position, w, h, width(), height(), &posX, &posY);

if (TJpgDec.drawJpg(posX, posY, buff, total, dither, invert) == 0)
ret = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/include/ImagePNG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ void pngle_on_draw(pngle_t *pngle, uint32_t x, uint32_t y, uint32_t w, uint32_t
{
if (_pngPosition != Image::_npos)
{
_imagePtrPng->getPointsForPosition(_pngPosition, pngle_get_width(pngle), pngle_get_height(pngle), E_INK_WIDTH,
E_INK_HEIGHT, &_pngX, &_pngY);
_imagePtrPng->getPointsForPosition(_pngPosition, pngle_get_width(pngle), pngle_get_height(pngle),
_imagePtrPng->width(), _imagePtrPng->height(), &_pngX, &_pngY);
lastY = _pngY;
_pngPosition = Image::_npos;
}
Expand Down