This commit is contained in:
2026-02-13 14:42:07 -08:00
parent df0527b123
commit fbc02af589
670 changed files with 55968 additions and 51275 deletions

View File

@@ -17,14 +17,13 @@ typedef struct myprivate
bool bConvert;
} PRIVATE;
int PNGDraw(PNGDRAW *pDraw)
void PNGDraw(PNGDRAW *pDraw)
{
PRIVATE *pPriv = (PRIVATE *)pDraw->pUser;
uint16_t usPixels[320];
uint16_t usPixels[240];
if (pPriv->bConvert)
png.getLineAsRGB565(pDraw, usPixels, PNG_RGB565_LITTLE_ENDIAN, 0xffffffff); // don't do alpha color blending
return 1;
} /* PNGDraw() */
void setup() {
@@ -46,13 +45,9 @@ PRIVATE priv;
priv.bConvert = false;
lTime = micros();
rc = png.decode((void *)&priv, PNG_FAST_PALETTE);
if (rc == PNG_SUCCESS) {
lTime = micros() - lTime;
sprintf(szTemp, "Decode time for native pixels = %d us\n", (int)lTime);
Serial.print(szTemp);
} else {
Serial.print("Decode error: "); Serial.println(rc, DEC);
}
lTime = micros() - lTime;
sprintf(szTemp, "Decode time for native pixels = %d us\n", (int)lTime);
Serial.print(szTemp);
priv.bConvert = true;
lTime = micros();
rc = png.decode((void *)&priv, PNG_FAST_PALETTE);