-
-
Notifications
You must be signed in to change notification settings - Fork 699
test and fix SAVEABLE #4495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
test and fix SAVEABLE #4495
Conversation
vips__foreign_convert_saveable() doesn't seem to work for all image types, start testing it more carefully. test_matrix tests matrixsave, which uses SAVEABLE_MONO ... test conversion of all image types
Sample bug in master from these problems -- RGB to mono works OK:
So the
It fails for RGBA. The saveable system needs simplifying and testing more carefully. |
a bit saner ... and deprecate VipsSaveable
a bit more consistent
This replaces the old The conversion to a saveable image type is supposed to be simpler and easier to understand and verify. There are a lot more tests! This fixes quite a few obscure bugs, as noted in the top comment. |
since pyvips needs it
CIFuzz caught an interesting fuzzer bug in this PR. You can download the reproducer here: $ vipsheader crash-c8c0ef1d5d8a06465e3a728c0cd8d37b59239cbe
crash-c8c0ef1d5d8a06465e3a728c0cd8d37b59239cbe: 1x1 dpcomplex, 1 band, error
$ vips copy crash-c8c0ef1d5d8a06465e3a728c0cd8d37b59239cbe x.jpg
Aborted (core dumped) |
VIPS_SAVEABLE_RGB | VIPS_FOREIGN_SAVEABLE_CMYK, | ||
VIPS_SAVEABLE_ANY = | ||
VIPS_FOREIGN_SAVEABLE_ANY, | ||
VIPS_SAVEABLE_LAST = 99, | ||
} VipsSaveable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could still move this to almostdeprecated.h
and alias vips_saveable_get_type()
to vips_foreign_saveable_get_type()
for compat, see e.g. commit kleisauke@865d67c. Not sure if that's the right approach, though.
Co-authored-by: Kleis Auke Wolthuizen <[email protected]>
vips_image_guess_format() could return a bad format for VIPS_INTERPRETATION_ERROR. Fixes a fuzzing fail.
It was a nasty bug in |
vips__foreign_convert_saveable()
doesn't seem to work for all image types, start testing it more carefully.test_matrix
tests matrixsave, which usesSAVEABLE_MONO
... test conversion of all image types.