JuliaIO / Netpbm.jl

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

An error and a deprecation warning while loading "PBMBinary" format #22

Closed magister-ludi closed 4 years ago

magister-ludi commented 4 years ago

In the function load(s::Stream{format"PBMBinary"}) the constructor BitArray(w, h) is called. This should now be BitArray(undef, w, h). In the function load(s::Stream{format"PBMBinary"}) the call to permuteddimsview has been deprecated. This should now be PermutedDimsArray (since ImageCore version 0.8.17).

I discovered this while adding methods for reading and writing "plain" Netpbm formats. I have code that fixes this issue (including added tests for "PBMBinary" format), and code that adds I/O for plain formats. I can submit this as a single PR, or two separate PRs, whichever seems best.

timholy commented 4 years ago

I'd gladly take either option, whichever you prefer. Thanks in advance!