-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Use JpegTurbo.jl to load .jpg images #216
Comments
@johnnychen94 Will JpegTurbo.jl be used automatically if people use up-to-date FileIO.jl versions or do I need to change something explicitly? Would like users to avoid the performance regression introduced in 1.7 of the old jpg loader. |
TL;DR; add Let me try to explain the FileIO strategy a bit. FileIO maintains a registry for various IO backends. For instance, there are four backends supporting JPEG format, i.e.,: # Among the JPEG backends, JpegTurbo has the highest priority, QuartzImageIO is only available on macOS
add_format(
format"JPEG",
UInt8[0xff,0xd8,0xff],
[".jpeg", ".jpg", ".JPG"],
[idJpegTurbo],
[idImageIO],
[idQuartzImageIO, OSX],
[idImageMagick]
) # 0xe1 Thus, when you try to do ImageIO contains no real codes, it borrows the functionality from JpegTurbo.jl and other backends. We (JuliaImages) aim to make ImageIO the default IO backend and we want to tell our users a simple answer for all similar questions, that is: add ImageIO "somewhere", use FileIO's
This is a bit incorrect. Before I wrote the JpegTurbo.jl, ImageMagick was the only IO backend for the JPEG format, so when you saw |
Thanks for the fix and the explanation! |
JpegTurbo.jl can speed up image loading quite a bit, and the previous ImageIO.jl versions had severe performance regressions for 1.7, which should be fixed if JpegTurbo.jl is used.
The text was updated successfully, but these errors were encountered: