Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

PNG => was Re: Re: Image processing and embedding metadata in images?

 [1/4] from: jasonic:panix at: 12-Nov-2001 20:20


> hmmm PNG maybe the best REBOL bet. For example storing stuff in a named > layer..
bingo! http://www.libpng.org/pub/png/spec/PNG-Chunks.html#C.Anc-text <quote> 4.2.3. Textual information The iTXt, tEXt, and zTXt chunks are used for conveying textual information associated with the image. This specification refers to them generically as text chunks . Each of the text chunks contains as its first field a keyword that indicates the type of information represented by the text string. The following keywords are predefined and should be used where appropriate: Title Short (one line) title or caption for image Author Name of image's creator Description Description of image (possibly long) Copyright Copyright notice Creation Time Time of original image creation Software Software used to create the image Disclaimer Legal disclaimer Warning Warning of nature of content Source Device used to create the image Comment Miscellaneous comment; conversion from GIF comment </quote> Any REBOL scripts out there for browsing/editing PNG binary data? - Jason

 [2/4] from: jasonic:panix at: 12-Nov-2001 23:00


> http://www.libpng.org/pub/png/spec/PNG-Chunks.html#C.Anc-text
Well for any who may be interested, here's some more I dug up: The iTXt chunk (international/Unicode text) is ripe for all sorts of uses. As you might expect, several enterprising people have written toolkits for exploring this. Here are a couple to get going: http://pmt.sourceforge.net/pngcrush/index.html Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline. http://www.libpng.org/pub/png/apps/pngmeta.html http://pmt.sourceforge.net/pngmeta/index.html [OpenSource] pngmeta is a command-line program that extracts metadata (such as text annotations) from PNG images and formats it as HTML, SOIF, RDF/XML, or simple keyword/value pairs. It can be used as part of a CGI script, for example. http://entropymine.com/jason/tweakpng/ [GPL C++ source included] TweakPNG is a low-level utility for examining and modifying PNG image files. It runs on Windows 95 (or 98 or higher) or Windows NT. Nice interface, easy to use... For example inserting a fresh iTXt and pasting in a REBOL program! do %image.png ..becomes an interesting and viable proposition for X-internet. Images which can: - email or upload themselves - load directly into wikilogs [VANILLA] - associate intelligently with news [time] and map [locations] systems - enable smart and dumb i2i [image-to-image] applications - associate to others in load/play sequences by keyword, name, author, date, location, url, subscriber, popularity, context ... - ??? A REBOL Port of TweakPNG's iTXt fatures are needed. Is anyone into Rebolizing a few lines of C++ ?? Jason

 [3/4] from: media:quazart at: 13-Nov-2001 8:53


Why is it that the X-internet scares the hell out of me? this example: do %image.png... is REALLY COOL ! BUT ... What a wonderfull way for mallicious people to include nasty stuff... its completely hidden from normal users AND they see ".png" and tell themsleves ... oh its just an image... no worry... DOH... I mean, it would be easy to _replace_ a perfectly OK script in an image with a nasty one for any _in_competent programmer! If all kind of x-internet systems become commonplace, is it just me or isn't it MUCH easier for the computing industry to go haywire? -Max ----- Original Message ----- From: "Jason Cunliffe" <[jasonic--panix--com]> To: <[rebol-list--rebol--com]> Sent: Monday, November 12, 2001 11:00 PM Subject: [REBOL] Re: PNG => was Re: Re: Image processing and embedding metadata in images?

 [4/4] from: jasonic::panix::com at: 13-Nov-2001 21:16


From: "Media" <[media--quazart--com]>
> Why is it that the X-internet scares the hell out of me?
ermm, perhaps becuase it is one of those off-key naff 'noxious verbal marketing trinkets doomed for oblivion ?? ;-))
> this example: do %image.png... is REALLY COOL !
YES Max I am glad you appreciate it. I am sure I will need some help ;-)
> BUT ... > > What a wonderfull way for mallicious people to include nasty stuff... its > completely hidden from normal users AND they see ".png" and tell
themsleves
> ... oh its just an image... no worry... DOH... > > I mean, it would be easy to _replace_ a perfectly OK script in an image
with
> a nasty one for any _in_competent programmer! > > If all kind of x-internet systems become commonplace, is it just me or
isn't
> it MUCH easier for the computing industry to go haywire?
Well, yes&no: As always depends on who uses it, how, for what, just like everything else in this world. The computing industry already always are haywire.. memes keep on meming - that's what makes them memes if you know what I meme. The move away from an industry which is still dominated by people sitting in front of PC-based devices to include appliances and widespread *group* connectivity cannot happen without a number of hardware software and cultural advances. Among these is a suitable vocabulary which sticks. X-internet sounds too much like last years bubblegum. But some of the ideas are very cool and one sees all kinds of effort towards them based on current platforms: templated wikilogs: [VANILLA Radio UserLand Zope Cheetah ...] X-internet: [MS.NET REBOL Groove ...] xtox: [Gnutella etc] http://www.sims.berkeley.edu/~rachna/courses/infoviz/gtv/ Some of what we don't yet have are: - ubiquitous broadband use [cable optic or wireless] - network-savvy-dumb appliances [for example: hifi-like digital storage devices which adapt cleanly to available broadband networks. Have their own built-in web/ftp servers or whatever to allow access configuration locally and remotely, users and permission management. vices which behave in hardware similar to REBOL's send function. cars, cameras, construction components, classrooms, office furniture, display screens with phones which all do the same.. medical devices, travel ticket systems, equipment diagnostics etc. It is great you raise the *errorist issue because it means one must proceed to the next step which is good scheme for various contexts: edit parse transfer verify load I think one would want to apply some encrypted pass-key mechanism with components at several levels: - in another datablock inside the image - referenced inside the images embedded script - in the 'do-ing REBOL script One reason for embedding image-source metadata is to help track any changes to the image+data itself, say by doing a checksum compare to a source file at a specified url. Although one can use any language, REBOL seems ideal for image embedding because it is so compact and cross-platform. One could even imagine bundling special executable players in a 'starter' image. [Encap-ed REBOL/View app or something..] It could be a way for REBOL to distinguish itself: a lover app [as opposed to a killer app] PNG spec offers some useful features already one could apply for safer REBOL http://www.libpng.org/pub/png/spec/PNG-Chunks.html ... Text Information Each of the text chunks contains as its first field a keyword [1-79 chars] that indicates the type of information represented by the text string. Other keywords may be invented for other purposes. Keywords of general interest can be registered with the maintainers of the PNG specification. However, it is also permitted to use private unregistered keywords. (Private keywords should be reasonably self-explanatory, in order to minimize the chance that the same keyword will be used for incompatible purposes by different people.) ... zTXt chunk contains textual data, just as tEXt does; however, zTXt takes advantage of compression. The zTXt and tEXt chunks are semantically equivalent, but zTXt is recommended for storing large blocks of text. ... more details http://www.libpng.org/pub/png/spec/PNG-Decoders.html#D.Text-chunk-processing http://www.libpng.org/pub/png/spec/PNG-Encoders.html#E.Use-of-private-chunks - Jason