Incorrectly export GIF image
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the issue with the Julia FileIO.save and load examples for all-ones and mostly-ones Bool matrices. Start by tracing GIF handling through FileIO and the suspected ImageMagick.jl wrapper; done means saving and loading these matrices no longer turns a mostly-one image into an all-zero image.
Written by the indexing model from the issue text.
Description
By save("xxx.gif", bitmat), one should get a white picture, however, the output is black.
using FileIO
save("one.gif", ones(Bool, 200, 200)) # get a black image
load("one.gif") |> iszero # true

More generally, when the rate of zeros is small enough, the ones-matrix is treated as a zeros-matrix.
a = ones(Bool, 200, 200)
# set zero on a small range
ind = rand(1:40000, 300)
a[ind] .= false
save("small.gif", a)
load("small.gif") |> iszero # true again
# set zero on more place
ind = rand(1:40000, 3000)
a[ind] .= false
save("normal.gif", a) # now we get the right image

This issue occurs only in the case of gif, might have to do with the wrapper of ImageMagick.jl?
- Dominant language
- Julia
- Stars
- 228
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaIO/FileIO.jl
-
Drop the hard `Pkg` dependencyPossibly taken @thchr claimed this 26 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Add SVGZ formatOpen
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
All issues in JuliaIO/FileIO.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
brown-ccv/Chamber.jl#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAstro/SolarPosition.jl#143 ·
-
distributions
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaBayes/Wren.jl#404 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAI/MLJTransforms.jl#113 ·
Maintainers usually reply within 1 day