Live data from Hacker News

We Need A Standard Layered Image Format

shapeof.com

51–60 of 145 posts

Re: We Need A Standard Layered Image Format

#51
post #43

"I want a filesystem in a single file. I'll pick the one I'm most comfortable with and pretend that it's much better than separate files". Meanwhile, we'll ignore all the semantic issues around the data. What exactly _is_ a layer? Any given image file? What if some tools only handle e.g. alpha-layers? What if a layer is actually a filter kernel? How are the layers composited? How are they ordered? Is it a linear orde…

Couldn't someone come up with a relatively sane schema for storing the same information that a PSD would contain in a SQLite database?

That way, you could standardize on the semantics that are already documented and familiar to other developers, but avoid the difficulties of the file format, which seem to be the issue here.

* disclaimer: I've never had to write a PSD-parser, I'm just going on hearsay.

Re: We Need A Standard Layered Image Format

#52
post #12

What about OpenRaster? It's used in open source apps like MyPaint and Gimp. http://www.freedesktop.org/wiki/Specifications/OpenRaster

> OpenRaster is an open exchange format for layered raster based graphics. How's that going to work for vector images?

You can have SVG layers in OpenRaster. See: http://freedesktop.org/wiki/Specifications/OpenRaster/Draft/...

Re: We Need A Standard Layered Image Format

#53
post #46
post #45

Earlier quoted context omitted.

There are currently 24 contiguous bytes of unused space in the SQLite header. If need be, and if SQLite catches on for use as a portable image format, I will be willing to allocate some or all of those 24 bytes to an identifier string for file(1).

This is surely one of the greatest responses I've ever seen on the internet. What was the intention with the unused space originally? Did you foresee this moment coming?

When designing a file format, it is always a good idea to plan for enhancements. There were originally 36 bytes of unused space in the 100-byte header of the SQLite 3.0.0 file format, back in 2004 - bytes set aside specifically to deal with unforeseen needs. Over the years, 12 of those bytes have been allocated to various improvements. 24 bytes remain. (I'd prefer not to use them up all at once or on a whim, obviously.)

Re: We Need A Standard Layered Image Format

#54
> When you want to send someone an image you want to pass them a single file, not an XML file with a folder of assets. While there are technical benefits to this, it's an incredible burden on the customer.

Or, you could just zip that whole thing up and everyone who doesn't have to care thinks it is "just one file", like .war's.

Re: We Need A Standard Layered Image Format

#55
post #41
post #35

Earlier quoted context omitted.

That is a problem with your browser not clearly indicating scrollable areas. Hacker News doesn't do anything special to prevent browsers from showing scrollbars.

But it doesn't do anything to force the scrollbars either, or to provide a visual treatment that indicates that this is an independent scrollable area. We've had iOS around for 6 years now, with its hidden-scrollbars approach, and OS X has followed the hidden-scrollbars approach for some time now as well. It is no longer acceptable to assume that scrollbars are necessarily going to be visible.

Hacker News does everything it is supposed to according to the CSS standard to indicate to your browser that the area is scrollable. In fact, it is obvious that the site is doing enough because the browser does in fact render the area as scrollable. The fact that your browser doesn't do anything to visually indicate when a region is an independent scrollable area is entirely Apple's fault.

You can argue that websites should be written to conform to the standards-violating behavior in Apple's browser rather than actual Web standards, but we already went through that with Microsoft in the '90s and early 2000s, and I don't think you'll find a lot of people who are eager to return to those days. Browser-makers are expected to conform to the standard, not vice-versa.

I am sympathetic to the fact that this is inconvenient, because I use Apple's software too. But it's Apple that's responsible for the inconvenience, not all the web designers who are correctly following the standard.

Re: We Need A Standard Layered Image Format

#57

Earlier quoted context omitted.

ESRI Shapefile formats include a DBF file, which is a Foxpro database.

And I still dream of spatialite becoming the one interchange format to rule them all.

I just used Spatialite to create a tool for managing large stacks of images on the pixel level; i.e., each image gets its own database file, each pixel is stored as an XYZ coordinate and an RGB value.

I can use Spatialite's built-in functions to rotate, translate, scale, etc. images; and use SQL to pull out sub-volumes of the stack, edit and composite them.

My biggest stack is almost 2000 images, over 90GB uncompressed data. Working with subvolumes is pretty snappy up to a few hundred megabytes, which is good enough for my purposes. For bigger jobs it should be possible to parallelize some tasks for better performance.

Not entirely on-topic, but the takeaway is I'm thumbs-up for using SQLite to process image data.

Re: We Need A Standard Layered Image Format

#58
post #39

Earlier quoted context omitted.

That page says: "The use of XCF as a data interchange format is not recommended by the GIMP developers, since the format reflects the GIMP's internal data structures, and there may be minor format changes in future versions."

It still seems like a better basis to fork for a format than something new and untested.

Something you don't control — and which the people who do control it say "don't use this because we'll probably change it often" — is somehow better than something you do control?

Re: We Need A Standard Layered Image Format

#60

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…

Also done with CBR / CBZ files (comic book archives) -- basically a renamed .zip of images with filenames numbered in ascending order.
Post reply on HN