-
Notifications
You must be signed in to change notification settings - Fork 80
Using PNGFiles.jl via ImageIO.jl (lazy loader) for .png image files #257
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
Codecov Report
@@ Coverage Diff @@
## master #257 +/- ##
=======================================
Coverage 76.08% 76.08%
=======================================
Files 8 8
Lines 414 414
=======================================
Hits 315 315
Misses 99 99
Continue to review full report at Codecov.
|
|
As @davidanthoff pointed out on slack, we need to make sure the MIME for png isn't messed up by this. Just making a note as a reminder |
|
Need to wait for JuliaRegistries/General#9508 (3 days). |
|
Does this mean that to load a png file we'll need to install |
Indeed, and as @johnnychen94's point illustrates, even once that's registered this needs careful thinking before merging |
|
It makes me think that if we were to move to this approach, it might be worth waiting until the big three, PNG.jl, JPEG.jl and TIFF.jl, were ready to make the switchover easier? |
|
IIRC packages get precedence by argument order. So we could leave QuartzImageIO and ImageMagick as valid loaders but put PNG as the first choice. |
|
If the final goal is to deprecate ImageMagick(is it?), then I think the following procedure makes sense:
|
|
I think we're likely to have ImageMagick around for some time for less commonly-used formats. Just restoring those lines to the |
| For example: | ||
| add_format(format"PNG", (UInt8[0x4d,0x4d,0x00,0x2b], UInt8[0x49,0x49,0x2a,0x00]), [".tiff", ".tif"]) | ||
| add_format(format"TIFF", (UInt8[0x4d,0x4d,0x00,0x2b], UInt8[0x49,0x49,0x2a,0x00]), [".tiff", ".tif"]) |
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.
Just wanted to highlight that I thought this was a typo, so corrected it
|
Could you try whether this would break the existing MIME based PNG story? Here is a simple test: |
|
@davidanthoff does this look right? |
|
Yes, if it produces a proper graph, all is good :) |
|
Just strip the WIP out of the title if you're ready for this to be merged. EDIT: that might not send a notification, so p(i)ng me too. (bad pun intended) |
|
Will do. Need to wait for ImageIO to be released and a plan to be settled on for the test failures in JuliaIO/PNGFiles.jl#5 |
|
@timholy Ready to merge, given JuliaIO/PNGFiles.jl#5 has been merged and released (edit: had the wrong PR linked) |
|
Oh boy oh boy oh boy! |

https://github.com/JuliaIO/PNG.jl isn't yet registered, but is functional with this branch.