Skip to content

webp: support sequential input device if full file is available

Since we do no random access during decoding, just a readAll() of the whole image file. So if it is all available already, we can handle a sequential device. That is useful for Quick AnimationImage, which will pass a finished QNetworkReply as the input device.

This commit removes some seek() calls in the header checking, that supposedly should reset the device position. These were in practice either no-ops or bugs, since the device is only being peeked, so the position never changes in the first place, and a QImageIOHandler is supposed to read from the device at the position it is at when passed.

Fixes: QTBUG-70245 Change-Id: I5a4ff5fa4bbd19b0545ad41645969d714b4dc7d5 Reviewed-by: default avatarAllan Sandfeld Jensen Reviewed-by: default avatarShawn Rutledge

This was discovered as an issue in neochat. Currently webp cannot be loaded over the network and throws an error.

Cherry pick of 369be99d, fixes

Merge request reports