Closed HelloDB closed 5 years ago
Hi, Any suggestions for this?
Hi, I am guessing you have solved the problem since the issue has been closed. I am interested in knowing the solution in case others encounter the same problem.
Hi, I am guessing you have solved the problem since the issue has been closed. I am interested in knowing the solution in case others encounter the same problem.
Yes, use tft. drawRGBBitmap () to draw,It works well. Thank you for your Lib
Thanks for reporting the solution. I think Adafruit has made changes to their library which has broken compatibility with the decoder examples. I will update the example.
Hi,
I have found that Adafruit have changed the input parameters to setAddrWindow() it used to be:
setAddrWindow(x_start, y_start, x_end, y_end);
If it now:
setAddrWindow(x_start, y_start, width, height);
You should also use startWrite() and endWrite() to bracket low level writes, the following change will work:
tft.startWrite(); // <<<<<<<<<<<< New
// draw image MCU block only if it will fit on the screen
if ( ( mcu_x + win_w) <= tft.width() && ( mcu_y + win_h) <= tft.height())
{
// Now set a MCU bounding window on the TFT to push pixels into (x, y, x + width - 1, y + height - 1)
// tft.setAddrWindow(mcu_x, mcu_y, mcu_x + win_w - 1, mcu_y + win_h - 1); // Old line
tft.setAddrWindow(mcu_x, mcu_y, win_w, win_h); // <<<<<<<<<<<< new changed line
// Write all MCU pixels to the TFT window
while (mcu_pixels--) tft.pushColor(*pImg++);
}
else if ( ( mcu_y + win_h) >= tft.height()) JpegDec.abort();
tft.endWrite(); // <<<<<<<<<<<< New
The library has been updated.
Thanks for reporting this.