You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently vips_target_finish returns void, this can be a problem because it needs to call vips_target_flush which can fail.
This silences any errors that might occur on the last write to the target, and can be particularly devious if all the writes up to that point fit into the target buffer, causing the only write to actually occur to fail silently.
In summary, when using the streaming api (at least _custom) any output that is less than VIPS_TARGET_BUFFER_SIZE can fail unbeknownst to the caller.
To Reproduce
Load and save a small image with a write implementation that fails.
Bug report
Describe the bug
Currently
vips_target_finish
returnsvoid
, this can be a problem because it needs to callvips_target_flush
which can fail.This silences any errors that might occur on the last write to the target, and can be particularly devious if all the writes up to that point fit into the target buffer, causing the only write to actually occur to fail silently.
In summary, when using the streaming api (at least _custom) any output that is less than
VIPS_TARGET_BUFFER_SIZE
can fail unbeknownst to the caller.To Reproduce
Load and save a small image with a write implementation that fails.
box.jpg
Environment
The text was updated successfully, but these errors were encountered: