Skip to content

Conversation

@IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Feb 15, 2020

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

@codecov
Copy link

codecov bot commented Feb 15, 2020

Codecov Report

Merging #257 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #257   +/-   ##
=======================================
  Coverage   76.08%   76.08%           
=======================================
  Files           8        8           
  Lines         414      414           
=======================================
  Hits          315      315           
  Misses         99       99
Impacted Files Coverage Δ
src/registry_setup.jl 92% <ø> (ø) ⬆️
src/registry.jl 92.64% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67d9c22...c408858. Read the comment docs.

@IanButterworth
Copy link
Member Author

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

@timholy
Copy link
Member

timholy commented Feb 15, 2020

Need to wait for JuliaRegistries/General#9508 (3 days).

@johnnychen94
Copy link
Member

Does this mean that to load a png file we'll need to install PNG instead of ImageMagick? If so then a lot of packages' test codes will be broken without adding PNG to the Project.toml's extra section.

@IanButterworth
Copy link
Member Author

Need to wait for JuliaRegistries/General#9508 (3 days).

Indeed, and as @johnnychen94's point illustrates, even once that's registered this needs careful thinking before merging

@IanButterworth
Copy link
Member Author

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?

@timholy
Copy link
Member

timholy commented Feb 15, 2020

IIRC packages get precedence by argument order. So we could leave QuartzImageIO and ImageMagick as valid loaders but put PNG as the first choice.

@johnnychen94
Copy link
Member

johnnychen94 commented Feb 15, 2020

If the final goal is to deprecate ImageMagick(is it?), then I think the following procedure makes sense:

  1. add a deprecation warning in ImageMagick and QuartzImageIO for specific image format (e.g., .png to encourage users to try out PNG.jl
  2. leave ImageMagick and QuartzImageIO as fallbacks in FileIO for a period
  3. unregister ImageMagick and QuartzImageIO from FileIO

@timholy
Copy link
Member

timholy commented Feb 15, 2020

I think we're likely to have ImageMagick around for some time for less commonly-used formats. Just restoring those lines to the add_format seems like it should be enough even without changing any of the other packages.

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"])
Copy link
Member Author

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

@Drvi Drvi mentioned this pull request Feb 16, 2020
@davidanthoff
Copy link
Contributor

Could you try whether this would break the existing MIME based PNG story? Here is a simple test:

using VegaLite, VegaDatasets

dataset("cars") |> @vlplot(:point, x=:Acceleration) |> save("foo.png")

@IanButterworth
Copy link
Member Author

@davidanthoff does this look right?
foo

@davidanthoff
Copy link
Contributor

Yes, if it produces a proper graph, all is good :)

@timholy
Copy link
Member

timholy commented Feb 24, 2020

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)

@IanButterworth
Copy link
Member Author

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

@IanButterworth IanButterworth changed the title (WIP) Using PNG.jl for .png image files (WIP) Using PNGFiles.jl via ImageIO.jl (lazy loader) for .png image files Feb 29, 2020
@IanButterworth IanButterworth changed the title (WIP) Using PNGFiles.jl via ImageIO.jl (lazy loader) for .png image files Using PNGFiles.jl via ImageIO.jl (lazy loader) for .png image files Mar 11, 2020
@IanButterworth
Copy link
Member Author

IanButterworth commented Mar 11, 2020

@timholy Ready to merge, given JuliaIO/PNGFiles.jl#5 has been merged and released (edit: had the wrong PR linked)

@timholy timholy merged commit f26d40a into master Mar 11, 2020
@timholy timholy deleted the png_jl branch March 11, 2020 14:39
@timholy
Copy link
Member

timholy commented Mar 11, 2020

Oh boy oh boy oh boy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants