-
-
Notifications
You must be signed in to change notification settings - Fork 705
Add the basic support for loading RAW format files with libRAW #4562
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
Conversation
libvips/foreign/librawload.c
Outdated
object_class->description = _("load raw camera files"); | ||
object_class->build = vips_foreign_load_libraw_build; | ||
|
||
foreign_class->priority = 100; |
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.
That's quite high priority, are you are it needs to be this high? Slower sniffers need to be near the back of the queue or they'll delay things like JPEG detection.
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.
I suspect this is due to the issue mentioned in #3380 (comment). As an alternative, we could lower the priority of tiffload
, guarded by HAVE_LIBRAW
.
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.
... thinking about this further, we also could prevent TIFF-based RAW images from being loaded via libtiff. I previously mentioned this approach in the linked comment above and just cleaned up the commit (now guarded behind HAVE_LIBRAW
) in kleisauke@955c467.
While this solution isn't very future-proof (and is essentially a wall of shame), it might help stop vendors from using standard TIFF signatures for their own custom RAW formats. 😅
This is great @lxsameer, thank you for doing this work! It seems to work OK for me, here's nip4 loading a cr2 sample: I made some (mostly) general comments. I think the big one is probably to only define |
Would you be able to set |
Hey folks, thanks for the review, I'll improve the code and ping you again for a review |
@jcupitt just a quick question, do you have a certain priority in mind? |
Now I think again, I think you can just not set priority. You define a set of suffixes and no |
I had another thought last night -- the |
@jcupitt absolutely, I'll change the name |
9654dd9
to
ad1b0ff
Compare
Updated the commit. But unfortunately, in my test program, when I call
I don't know what might be the issue, as far as I can see, I set the same size for both |
It looks like everything needs to be moved into BTW, seeing |
ad1b0ff
to
6cb4e2d
Compare
@kleisauke Thank you, used your commit in my and added you as the co-author |
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.
I can't comment much on the overall implementation, but the extensions and libraw params look good!
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.
It looks great! I think I found a small bug in threading. and I have a question about the sort of interface we should support.
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
6cb4e2d
to
4bd4892
Compare
I think this looks great. Thank you again for doing all this work @lxsameer. I suppose we should have some tests, but they can come in a followup PR. This is an API change, so we need a line in the changelog too (and we should credit you!), but again that can be a followup. I've made a stable 8.17 branch for the current release, so I think we are ready to merge to master. |
Awesome, thank you. |
OK, let's merge and fix anything else later. Nice job! |
This PR adds support for basic libraw supports. I tried to do the bare minimum so I can get early feedback and build upon that.
Looking forward to your feedback.