News for hackers. Stuff that matters.
Re:Libtiff goes offline by banachtarski on Monday September 12, 2016 @08:20PM (#12484812)
Tiff? That is a format I haven't heard in a long time.

edit: to everyone replying. TIFF is awful. We have lossless compression now (read PNG) which is at least a billion times better. We shouldn't use it for anything in this day and age. Hell, just DEFLATE your TIFF and call it a new format. It will be better than TIFF

Re:Libtiff goes offline by rleigh on Tuesday September 13, 2016 @03:33AM (#12486220)
TIFF is one of the most open and flexible file formats out there.

PNG offers only a tiny subset of what's possible with TIFF. Note that TIFF supports multiple compression formats, lossless and lossy, multiple sample formats and sample counts, very flexible organisation of data layout etc. PNG offers a small number of sample formats, fixed layout and compression, and none of the higher-level TIFF features.

PNG is simple and easy to use. But "better" is subjective and by most objective measures it's inferior to TIFF.

Re:Libtiff goes offline by mahyarm on Monday September 12, 2016 @10:02PM (#12485145)
TIFF is typically used as an intermediate uncompressed memory format for almost everything in images. Your png library is probably uncompressing png images into TIFF images internally. Your printer probably translates whatever is given to it into a TIFF image to print, your scanners probably use TIFF as a raw format to translate into something else. Even camera RAW images are probably using TIFF in some way or another.
Re:Libtiff goes offline by kalleboo on Tuesday September 13, 2016 @12:58AM (#12485732)
> Even camera RAW images are probably using TIFF in some way or another

https://en.wikipedia.org/wiki/Digital_Negative DNG is based on the TIFF/EP standard format, and mandates significant use of metadata

Re:Libtiff goes offline by kalleboo on Tuesday September 13, 2016 @12:42AM (#12485677)
> Hell, just DEFLATE your TIFF and call it a new format

You don't have to call it a new format, TIFF has supported lossless compression for decades now https://en.wikipedia.org/wiki/TIFF#TIFF_Compression_Tag

DNG is also based on TIFF, so I can imagine people might use libtiff to read DNG headers.

Re:Libtiff goes offline by cornellwright on Monday September 12, 2016 @08:54PM (#12484934)
Tiff is very useful because it lets you do almost anything. A tiff image is just several arrays of numbers, you decide how many bits, signed, unsigned, float, int, etc.

This is very helpful for processing which treats each pixel as a sample of the scene, such as computational microscopy or remote sensing. I've always wondered if that had something to do with why it was hosted at remotesensing.org.

Re:Libtiff goes offline by banachtarski on Monday September 12, 2016 @09:56PM (#12485121)
See my edit. Also, when you are doing image processing, operating in scanlines is usually the least performant way of doing things, hence whey we have texture compression formats (even lossless ones) which do block encodings. TIFF has no reason for existing in my opinion.
Re:Libtiff goes offline by cjhanks on Monday September 12, 2016 @10:41PM (#12485283)
TIFF supports many useful features for processing very large images. Tiled compression, storing channels in contiguous hyperplanes or on a single image plane, multiple levels of detail, custom compression codecs (lossless or lossy), sparse images, arbitrary bit widths, and permits storing arbitrary metadata with the data.

Viewers of libtiff often treat it like PNG/JPEG, but good Tiff viewers can leverage this functionality. Typically few batteries are included.

Tiff is kind of a cross breed between structured portable formats (HDF5/NetCDF) and imagery.

Re:Libtiff goes offline by banachtarski on Tuesday September 13, 2016 @12:43AM (#12485681)
I don't doubt that you can have a library that provides all those features. All those features can exist for any lossless image format. My point is that as far as comparing image formats goes, the capabilities of the frontend library isn't a useful metric for evaluating the format itself which, in my opinion, can optimize for the following traits:

1. On-disk size

2. Compression/decompression speed

3. Access speed (for use in image analysis algorithms, editing, compositing, etc)

4. GPU friendliness (which operates in warps on small blocks of contiguous pixels in image space)

TIFF doesn't really optimize for any of these (not even #2 since in-memory decompression can be faster than paging uncompressed data from disk)

Re:Libtiff goes offline by rleigh on Tuesday September 13, 2016 @03:39AM (#12486247)
TIFF is the standard format for scientific imaging. It's the container format used by well over 80% of all imaging formats out there.

It's being slowly replaced by HDF5 for some applications.

But all of the features you mention above are tunable and are in practice perfectly fine with TIFF containers.

Re:Libtiff goes offline by 7952 on Tuesday September 13, 2016 @04:25AM (#12486430)
The big problem with highly tuned formats is that they make a lot of choices for the user. This works well when the format is used exactly as designed, but that is often not the case. With a tif I can pick exactly the compression, bit depth, color mode, tiling etc. that I need for the specific data.
Re:Libtiff goes offline by gpvos on Tuesday September 13, 2016 @07:12AM (#12486996)
> All those features can exist for any lossless image format.

Yes, but for most image formats they aren't defined. They are for TIFF.

The problem, of course, is that if you use an exotic TIFF feature, very few TIFF readers will understand you.

Re:Libtiff goes offline by rleigh on Tuesday September 13, 2016 @03:36AM (#12486231)
TIFF can operate with scanlines, strips or tiles. Big images, such as 200k x 200k digital pathology slide scans, are stored in TIFF as e.g. 512x512 tiles, indivdually compressed and transparently accessible to the viewer. It is perfectly capable of dealing with images of vast sizes.
Re:Libtiff goes offline by wtracy on Monday September 12, 2016 @10:28PM (#12485241)
I don't know of any other application-independent image format with good support for layers. Seriously. (Even Tiff doesn't really have good support for layers.)

.PSD is tightly tied to Photoshop's internals, and .xcf is tightly tied to Gimp's internals. (The Gimp core developers explicitly recommend against using .xcf as an interchange format, even though the format has a fairly complete publicly available spec.) I've seen .gif images with multiple frames used as images with layers, but that forces every layer to have the same resolution, and of course limits you to an 8-bit color depth.

Supposedly the Gimp and Krita devs are collaborating on a new interchange format that will support things like layers, but I haven't heard any news about that in years.

Re:Libtiff goes offline by DiThi on Tuesday September 13, 2016 @02:54AM (#12486092)
What happened with the OpenRaster format?
Re:Libtiff goes offline by boudewijnrempt on Tuesday September 13, 2016 @03:20AM (#12486174)
It's doing fine. It's the native format for MyPaint, Krita supports it, Scribus supports it. Gimp's support is outdated, but that's because Gimp gets releases so rarely.
Re:Libtiff goes offline by DiThi on Tuesday September 13, 2016 @03:35AM (#12486228)
It was kind of a rhetorical question. I looked it up after I sent the comment to confirm what you just said. I was answering to the last paragraph of the parent comment.
Re:Libtiff goes offline by wtracy on Tuesday September 13, 2016 @04:59PM (#12492181)
Oh, very cool, it looks like they are making good progress!

Unfortunately, it looks like there's no support for it in Photoshop, and I doubt that's likely to change.

Re:Libtiff goes offline by forgettableuser on Monday September 12, 2016 @09:10PM (#12484987)
TIFF is still used in the Apple ecosystems. It got a mini-rebirth recently when Apple started doing retina displays. TIFF has the ability to store multiple images, which Apple has latched onto to allow different images to be used for different resolution screens.
Re:Libtiff goes offline by niccaluim on Monday September 12, 2016 @09:07PM (#12484982)
It's popular in mapping because it can be georeferenced. https://trac.osgeo.org/geotiff/
Re:Libtiff goes offline by TylerE on Monday September 12, 2016 @08:22PM (#12484818)
Still run into it with things like patents. It was the goto for a long time for scanned imagery.
Re:Libtiff goes offline by fdgdasfadsf on Tuesday September 13, 2016 @02:24AM (#12485989)
Can we have multichannel 16bit PNGs now? Can PNGs hold 3D images? If so awesome I can drop TIFF at last.

Not all images are taken by cameras using 3 channels.

Re:Libtiff goes offline by dagw on Tuesday September 13, 2016 @06:50AM (#12486908)
Can we have multichannel 16bit PNGs now?

The PNG-format supports them (up to 4 channels) however not all apps know what do with them.

Re:Libtiff goes offline by cooper12 on Monday September 12, 2016 @08:30PM (#12484858)
It's commonly used as an archival format since it's not lossy like jpeg.
Re:Libtiff goes offline by matthuggins on Monday September 12, 2016 @08:44PM (#12484907)
JPEG is commonly used in its lossy format, but there's lossless JPEG[1] as well.

[1] https://en.wikipedia.org/wiki/Lossless_JPEG

Re:Libtiff goes offline by acdha on Monday September 12, 2016 @09:00PM (#12484959)
Application support is pretty huge, though: that's what effectively turned JPEG 2000 into a niche format since the standard was patent and license encumbered for the first decade and change and the vendors didn't make interoperability a priority because they assumed the technical merits would force everyone to adopt it in the end. When you're talking about lossless, however, it's often in the context of archival storage and people get spooked after they encounter files which they have trouble opening with perfect fidelity.

It's a shame since the compression technology was impressive and j2k would also have made a great progressive image format had browsers supported it.

Re:Libtiff goes offline by rleigh on Tuesday September 13, 2016 @03:41AM (#12486258)
TIFF has selectable (and pluggable) compression. While it's standard to use deflate compression, you can also use jpeg2000 or any other algorithm of your choice if you want lossy compression.
Re:Libtiff goes offline by banachtarski on Monday September 12, 2016 @09:57PM (#12485123)
See my edit
Re:Libtiff goes offline by torrent-of-ions on Tuesday September 13, 2016 @08:29AM (#12487508)
TIFF is like a container format. It supports lossless compression. Read up.
Re:Libtiff goes offline by maxxxxx on Monday September 12, 2016 @08:34PM (#12484873)
TIFF is still used a lot in photography.
Re:Libtiff goes offline by justinlardinois on Tuesday September 13, 2016 @03:05AM (#12486129)
No matter how old or outdated a technology is, there will always be someone still using it somewhere.

I work for a company that makes workers' compensation software. I don't know of anything in our product that actually generates new TIFFs, but we've got plenty of old ones bumping around that were either uploaded by users or imported from other systems. I end up interacting with TIFFs one way or another every other month or so.

Re:Libtiff goes offline by aoloe on Tuesday September 13, 2016 @09:46AM (#12488148)
As far as I know, PNG does not support CMYK nor spot colors.

Nor clipping paths.

For print, there is not really an "open" alternative that is as good as TIFF.

Re:Libtiff goes offline by umanwizard on Monday September 12, 2016 @08:50PM (#12484925)
IIRC, it's used a lot for black-and-white images without a lot of photographic detail (schematics, etc.)
Re:Libtiff goes offline by tomc1985 on Monday September 12, 2016 @08:54PM (#12484935)
Digital negative storage for photography

Texture data for some videogames

Portable format for layered composites (a la Photoshop)

Re:Libtiff goes offline by rwmj on Tuesday September 13, 2016 @05:47AM (#12486665)
TIFF was used (probably still is) to store data from gas detectors. It wasn't called TIFF, but it was based on the format plus custom tags to store extra data and image layers. As a format it is super-flexible.
Re:Libtiff goes offline by draw_down on Monday September 12, 2016 @09:58PM (#12485126)
And yet, TIFF images still exist.