JuliaIO / Netpbm.jl

Load and save Netpbm images in Julia
Other
4 stars 7 forks source link

Added code for storing metadata in netpbm images #31

Closed magister-ludi closed 1 year ago

magister-ludi commented 2 years ago

The save methods now accept arguments of type ImageMeta from ImageMetadata.jl. The properties in objects are saved as comments in the image files.

Tests for reading and writing files with and without metadata have been added.

This adds to the dependencies of Netpbm.jl, which might be a reason to reject these changes.

codecov[bot] commented 2 years ago

Codecov Report

Base: 93.26% // Head: 93.67% // Increases project coverage by +0.40% :tada:

Coverage data is based on head (7d010a8) compared to base (d516dd8). Patch coverage: 95.45% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #31 +/- ## ========================================== + Coverage 93.26% 93.67% +0.40% ========================================== Files 1 1 Lines 282 316 +34 ========================================== + Hits 263 296 +33 - Misses 19 20 +1 ``` | [Impacted Files](https://codecov.io/gh/JuliaIO/Netpbm.jl/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIO) | Coverage Δ | | |---|---|---| | [src/Netpbm.jl](https://codecov.io/gh/JuliaIO/Netpbm.jl/pull/31/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIO#diff-c3JjL05ldHBibS5qbA==) | `93.67% <95.45%> (+0.40%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIO). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIO)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

magister-ludi commented 1 year ago

Sorry to bother busy people, should I merge this, or would someone like to review it? Perhaps @timholy or @johnnychen94 are the most relevant reviewers?

magister-ludi commented 1 year ago

I'll add the compat entry. I notice the build fails for Julia 1.0, because isnothing is undefined. Is it better to change the compat value for Julia (not sure when isnothing was added) or revert to ===nothing?

I should have merge permission when it's all ready.

johnnychen94 commented 1 year ago

Oh, you can add a compat definition to fix this. There's no need to bump julia compat for such trivial cases.

if VERSION < v"1.1"
    isnothing(x) = x === nothing
end
magister-ludi commented 1 year ago

All tests are passing. Merge now includes version update.

magister-ludi commented 1 year ago

It appears that I don't have permission to merge: there is no "Merge pull request" button. Would you merge please, @johnnychen94

I have also incremented the minor version number, so that needs to be registered.