Replies: 2 comments
-
Hello @vibbix, Thanks for the detailed report. I think this was fixed a week or so ago with 0a91e2d, see kleisauke/net-vips#101 The fix is in the head of the 8.10 branch and should be released in 8.10.3 in a few day's time. |
Beta Was this translation helpful? Give feedback.
0 replies
-
NetVips.Native v8.10.5(.1) is now available. The network stream sample was extended with commit kleisauke/net-vips@2b8d25d to test this. Let me know if this works for you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
When using the streaming API, PNG loader will not tolerate different sized reads from what as requested.
To Reproduce
Load a PNG Image from a stream using the source API. If the callbacks are less than the size required, libspng will return with a "pngload_source: end of stream" error. In older lib VIPS version, this creates a lot of "[WARNING] not enough data"
Steps to reproduce the behavior:
Other loaders, like JPEG seem to tolerate this behavior.
Expected behavior
The png loader should be able to tolerate getting only partial responses back, it seems to ignore the number of bytes returned back to it.
Actual behavior
The PNG loader totally fails, killing the pipeline.
Logs
Here's an example where I used a decorated stream to back-fill the PNG.
Stream-1 is a Buffered Stream of sorts, which keeps a nearly 8k slice buffered.
Stream-2 is a the actual Source stream, and its direct calls.
Stream-2 in this case now uses a backfill approach. If a PNG is being read and less data is returned than requested, additional requests are made.
Environment
Confirmed on Linux and macOS.
Both were using version 8.10.1 from libvips-packaging. A similar issue exists with older libvips version as well when using libpng.
Example code
I Was able to write some shareable C# to demonstrate this issue quickly
Demonstrates_how_to_replicate_the_png_loader_issue.txt
Beta Was this translation helpful? Give feedback.
All reactions