Live data from Hacker News

We Need A Standard Layered Image Format

shapeof.com

121–130 of 145 posts

Re: We Need A Standard Layered Image Format

#121

TIFF, http://en.wikipedia.org/wiki/Tagged_Image_File_Format has been around since 1993. It supports layers. It supports compression. It supports paged(!) images. It has well-defined supported image encoding formats. It's already supported by all the image editing software you've ever used (from this millennia). We have a Standard Layered Image Format. HURRAY. NEXT PROBLEM, PLEASE.

Looks like you only read the title, which is admittedly wrong for the article. He's not mainly asking for a LAYERED file format, but rather one that can include disparate types of image data (bitmap AND vector, for example).

I thought we already had this in MPEG-4.

Re: We Need A Standard Layered Image Format

#122

It's not going to happen for the same reason a standard 3D format will never happen. (and no neither FBX nor Collada fit). The problem is, at least in the case of image editors (and 3d editors), standard formats arguably stifle innovation because you have to break the standard to add anything. Maybe you decide it would be be better if all vector colors were stored as HSVA instead of RGBA except now no one can read yo…

Even if all vendors deviate, it's still easier to interoperate, since at least some of the structure is transparent.

Re: We Need A Standard Layered Image Format

#123

Earlier quoted context omitted.

Does the zip format let you replace an arbitrary file inside an archive without rewriting the whole file? It's not uncommon to see Photoshop files that are 400+ MB, and rewriting the whole file on save would have some pretty poor performance. The other examples of files that use the zip approach are either distribution-only (ipa/apk/jar) or generally don't get very big (word processing).

You can easily add new files at the end, then rewrite the central directory header (which is at the end of the file for exactly this kind of reason: not have to rewrite everything to add new files). And because the CDH specifies offsets to files, you can replace the old entry and put the new one there (replace old offset by new offset, done). This does however mean the old entry will still be in the file until you "g…

This is however the sort of thing SQLite already does for you.

Re: We Need A Standard Layered Image Format

#124
post #112
post #106

Earlier quoted context omitted.

Image formats have come a long way. I think the author wants an image format that can replace .psd in a sensible way. TIFF sadly cannot do that. While it can contain layered raster data, it lacks a lot of other capabilities. The author explicitly mentions vector layers, but if you want parity with .PSD you're looking at also having to support adjustment layers (hue/curves/levels/etc), blending modes, opacity/fill, ra…

.XCF

Not really that is still as good/bad as .PSD is because of the nature of what the file is used for. They are both primarily containers for unfinished works and are designed to hold a lot of detail without so much regard for size and portability. Of course the .XCF format is open but not good enough for a simple viewer or even a web browser. Some file format based on SQLite will probably be more viable as a cross platform image format that is extensible beyond any one software developer limiting it. Kind of like HTML.

Re: We Need A Standard Layered Image Format

#125
post #106

TIFF, http://en.wikipedia.org/wiki/Tagged_Image_File_Format has been around since 1993. It supports layers. It supports compression. It supports paged(!) images. It has well-defined supported image encoding formats. It's already supported by all the image editing software you've ever used (from this millennia). We have a Standard Layered Image Format. HURRAY. NEXT PROBLEM, PLEASE.

Image formats have come a long way. I think the author wants an image format that can replace .psd in a sensible way. TIFF sadly cannot do that. While it can contain layered raster data, it lacks a lot of other capabilities. The author explicitly mentions vector layers, but if you want parity with .PSD you're looking at also having to support adjustment layers (hue/curves/levels/etc), blending modes, opacity/fill, ra…

To provide a better answer than the GP:

.PDF .SVG .DXF/.DWG

All of these are open standards or basically open standards which are already widely implemented and allow the use cases mentioned (vector and raster combinations and layers) and also many of the ones you have thrown in.

Of course the real problem is that they are far too complex for most people's needs so why bother.

People really don't really often need to share the 'layers' of images combined with vector data (usually you use the layers yourself then just share the final product - a flattened JPG or similar), however if they do the above formats are there for them.

Re: We Need A Standard Layered Image Format

#126
post #124
post #112

Earlier quoted context omitted.

.XCF

Not really that is still as good/bad as .PSD is because of the nature of what the file is used for. They are both primarily containers for unfinished works and are designed to hold a lot of detail without so much regard for size and portability. Of course the .XCF format is open but not good enough for a simple viewer or even a web browser. Some file format based on SQLite will probably be more viable as a cross plat…

It meets all of the requirements of the parent post I replied to, plus it even has a pretty decent open source editor. It's internal structure may not be in SQLite format, but it is an extensible tag based chunk format. You shouldn't dismiss it so easily.

Re: We Need A Standard Layered Image Format

#128
post #82

IMHO SQLite is horrible format. using Matroska (.mkv) would be suitable for anything, vectors, bitmaps, audios and so on. It's essentially a container format like XML but for binary WebM is based on mkv as well.

I thought about this (actually, an ISO based format like MPEG-4, but same idea). You could even represent edits as samples over time, and then play back the file as a movie!

Re: We Need A Standard Layered Image Format

#129
What I'd like is the ability for two editors to work on a file at the same time, so layer locks might need to be built in. A db seems to me, a novice in everything relevant(!), to be a good way to allow multiple applications access whilst controlling for collisions.

Re: We Need A Standard Layered Image Format

#130

FXG could have solved the single file problem by grouping all the files up and making a zip file, and picking a different extension. For example this is how Android (.apk) and iOS (.ipa) applications are distributed. It also has the advantage that if you extract the zip you can now access whatever pieces are inside as separate files even by tools that don't understand the containing format. (eg a bunch of jpg/png ins…

Exactly. An interchange format should be editable with standard tools included with windows, and it should be easy to write all the code needed to extract part of the file yourself. Sqlite has many benefits, but realistically the only way to interact with it is through someone else's code. That rules it out as a suitable interchange format.

Any performance benefits sqlite might have are easily outweighed by the ease of interacting with the zip-based format.

Post reply on HN