RDF in PNG
A long-running goal of mine is to write a image gallery for my web page, so the screenshot and photo galleries can have categories, titles, dates, etc. Being a fan of metadata, XML, Dublin Core etc, I've planned to do this by embedding the metadata into the image files instead of relying on a database.
A little poking and emailing comes up with interesting links. Dave Beckett has embedded RDF into a PNG by using a tEXt field called 'Metadata'. However, he doesn't have any nice tools to do this and usually uses pnmtopng (which allows the user to specify text chunks). I poked a libpng but that doesn't really allow me to fiddle with the chunks.
So I'm announcing PyPNG! A very small and rather poor Python (plus a smidge of C to do CRCs) library with grand ambitions. At the moment I can copy a PNG file (by reading the chunks, and then writing them again), display the text chunks, et la piece de resistance: a tool to set the content of an arbitary text chunk! PNGs with embedded RDF, here I come.
Once I've fiddled with the library design a little I'll write a PNG Explorer (hmm, png:/// in Nautilus is tempting) and a Metadata Editor for PNG files. Then I'll try and do exactly the same for JPEG files. Finally of course I'll have to write the web front-end.
No downloads yet, but if you want the source ask for it. Hopefully I'll have a sane tarball of PyPNG done this week though.
Anyway, I like the idea of adding info to my pictures. It could be useful in many ways...
albert...
Andi -- nice. I'd probably extend that idea to store the thumbnails inside the image files, and of course use RDF more. The concepts are very similar though.
Personally, I run a photogallery on my website where I query all the EXIF tags for date and time, camera settings, as well as programmable tags such as comment, latitute/longitude, and photographer.
There are plenty of blank tags, and I'm sure there is one that could be used for embedding RDF, like here. I know that I've certainly embedded HTML into the comment tag before.
The problems with additional formats is that it means additional software, with additional libraries, with addition frontends, with additional ...
http://jigsaw.w3.org/rdfpic/
http://www.w3.org/TR/photo-rdf/
Of course, it would be nicer to have it on libpng, and extend it for other image formats, but checking their work out may save you some time.
http://sng.sourceforge.net/
"SNG is implemented by a compiler/decompiler called sng that losslessly translates between SNG and PNG."
SNG being a plain text representation of PNG.
I never used it though ;)
jpegrdf, sng, rdfpic I've all seen and examined. I did loads of research before starting :)
Based on the PNG Format and Embedded Metadata
. It uses DC Metadata with PNG, unfortunately nothing acutally seems to be available to the public. I'm trying to store large volumes of images with their metadata attached (and hopefully one day searchable).
Using an XML format (and pre-exisiting metadata formats make sense) is great as potientially the format can be further extended such as by adding SVG regions as proposed by Kanzaki and others.
So yeah, I'm interested in your project :).