Loading a remote TIFF
The following code can be used to load remote TIFFs without saving them to the disk.
using TiffImages, Downloads, FileIO
function load_tiff_without_saving(url)
buffer = IOBuffer()
Downloads.download(url, buffer)
bufstream = TiffImages.getstream(format"TIFF", buffer)
TiffImages.load(read(bufstream, TiffFile))
end
load_tiff_without_saving (generic function with 1 method)
We'll load an example from tlnagy/exampletiffs
coffeepath = "https://github.com/tlnagy/exampletiffs/raw/11516d288c4b03a258aa3027705b0e9d2ce2b5de/coffee.tif"
coffeeimg = load_tiff_without_saving(coffeepath)
No disks involved!
This page was generated using DemoCards.jl and Literate.jl.