JuliaImages / Images.jl

An image library for Julia
http://juliaimages.org/
Other
534 stars 143 forks source link

Tiled TIFF discrepency #1043

Open chrstphrbrns opened 1 year ago

chrstphrbrns commented 1 year ago

Noticed this while developing new features for TiffImages.jl

It seems more likely that the images should be identical

$ convert -seed 3 -size 4023x3007 xc: +noise Random -define tiff:tile-geometry=256x256 'tiled.tif'
$ convert -seed 3 -size 4023x3007 xc: +noise Random 'non_tiled.tif'
julia> TiffImages.load("tiled.tif") == TiffImages.load("non_tiled.tif")
true

julia> Images.load("tiled.tif") == Images.load("non_tiled.tif")
false

julia> tiled = Images.load("tiled.tif");

julia> nontiled = Images.load("non_tiled.tif");

julia> max_discrepency = maximum(abs.(float.(red.(tiled)) .- float.(red.(nontiled))))
0.0019531846f0

julia> rationalize(max_discrepency)
64//32767
mkitti commented 1 year ago

If we load this via ImageMagick.jl are the files equivalent then?