gdImageCreateFromWebpCtx is broken

Issue #75 resolved
Remi created an issue

Trying to understand why PHP use gdImageCreateFromWebpPtr.. I try this one.

Loop to detect size never end.

do {
    n = gdGetBuf(dummy, 1024, infile);
    size += n;
    printf("size=%d\n", size);
} while (n != EOF);

gdGetBuf never return EOF, but 0.

But after this, need to rewind the file, which requires a seek on the context which is not desirable.

Need another implementation (single read with buf realloc ?).

Comments (2)

  1. Log in to comment