-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
wrong tiff saved when image is large. #967
Comments
Can't reproduce it in (@v1.6) pkg> add FileIO, ImageIO, ImageCore
julia> using ImageCore, FileIO
julia> a = rand(2024, 2048);
julia> save("test.tif", Gray.(a))
shell> du test.tif
32388 test.tif I don't think numerical array is consistently supported. You might have to change it to |
I test it again, it works on a Ubuntu system, but not on windows 10 version 21H1. Also tried png, it made Julia crashed. |
Nothing suspicious from my understanding. It might be due to a broken artifact, can you verify this on a clean depot path? For example, start the Julia with the environment I'm not a Windows guy so don't know much about how to set the environment, in ubuntu, it can be done via e.g., |
I deleted all artifacts, and update the environment, the crash remains. |
The message you showed uses Can you check if explicitly using ImageIO backend works? using FileIO, ImageIO, ImageCore
ImageIO.save(File{format"TIFF"}("test.tif"), rand(Gray{N0f8}, 2080,2080)) Also, what's your FileIO version? |
I am about to show this, i found the using TiffImages,ImageCore
a = rand(RGB{N0f8},2080,2080)
img = TiffImages.DenseTaggedImage(a)
TiffImages.save("test.tif",img) and the result tiff is just 167 bytes and not recognizable. |
@tlnagy any ideas on this? |
FYI, I'm a Windows 10 user and I can't reproduce the problem using ImageMagick.jl to save either TIFF or PNG. status-m
What are the contents of the broken files? julia> read("test.tif", 32) |
Here is the system info, my windows 10 is version 21H1. status
|
Since you have a lot of packages installed in your environment, it is recommended that you test with a minimal set of packages first. I was also concerned about the number of threads, but on my machine, it worked even with 8 threads. |
I tried removing some packages, then problems solved. Thanks for your help and tips. |
This save a tiff of 42.5KB:
but
a = rand(2080,2080)
saved a tiff of 258 Bytes that system can't recognize.Tested on
Julia v1.6.1
,Images v0.24.1
The text was updated successfully, but these errors were encountered: