is there a way to expose text contained in a PNG?

aloha, y'all!

this morning, i took an action item to investigate whether or not the PNG 
specification, which is located at:
http://www.w3.org/TR/REC-png.html
contains a conformance statement for User Agents (such as that found in the 
CSS2 Rec), and i am disappointed to report that it does not...  it only 
speaks of viewers, as in graphics viewers, and not user agents as defined 
by UAAG and in other W3C TRs, such as the conformance section of the CSS2 
spec, which is located at:
http://www.w3.org/TR/REC-CSS2/conform.html#conformance

the PNG Recommendation does, however, contain the following pertinent text:

-- begin first quote --
    2.8. Text strings

       A PNG file can store text associated with the image, such as an
       image description or copyright notice.  Keywords are used to
       indicate what each text string represents.

       ISO 8859-1 (Latin-1) is the character set recommended for use in
       text strings [ISO-8859].  This character set is a superset of
       7-bit ASCII.

       Character codes not defined in Latin-1 should not be used, because
       they have no platform-independent meaning.  If a non-Latin-1 code
       does appear in a PNG text string, its interpretation will vary
       across platforms and decoders.  Some systems might not even be
       able to display all the characters in Latin-1, but most modern
       systems can.

       Provision is also made for the storage of compressed text.

       See Rationale: Text strings (Section 12.10).
-- end first quote --

-- begin second quote --
    12.10. Text strings

       Most graphics file formats include the ability to store some
       textual information along with the image.  But many applications
       need more than that: they want to be able to store several
       identifiable pieces of text.  For example, a database using PNG
       files to store medical X-rays would likely want to include
       patient's name, doctor's name, etc.  A simple way to do this in
       PNG would be to invent new private chunks holding text.  The
       disadvantage of such an approach is that other applications would
       have no idea what was in those chunks, and would simply ignore
       them.  Instead, we recommend that textual information be stored in
       standard tEXt chunks with suitable keywords.  Use of tEXt tells
       any PNG viewer that the chunk contains text that might be of
       interest to a human user.  Thus, a person looking at the file with
       another viewer will still be able to see the text, and even
       understand what it is if the keywords are reasonably self-
       explanatory.  (To this end, we recommend spelled-out keywords, not
       abbreviations that will be hard for a person to understand.
       Saving a few bytes on a keyword is false economy.)

       The ISO 8859-1 (Latin-1) character set was chosen as a compromise
       between functionality and portability.  Some platforms cannot
       display anything more than 7-bit ASCII characters, while others
       can handle characters beyond the Latin-1 set.  We felt that
       Latin-1 represents a widely useful and reasonably portable
       character set.  Latin-1 is a direct subset of character sets
       commonly used on popular platforms such as Microsoft Windows and X
       Windows.  It can also be handled on Macintosh systems with a
       simple remapping of characters.

       There is presently no provision for text employing character sets
       other than Latin-1. We recognize that the need for other character
       sets will increase.  However, PNG already requires that
       programmers implement a number of new and unfamiliar features, and
       text representation is not PNG's primary purpose. Since PNG
       provides for the creation and public registration of new ancillary
       chunks of general interest, we expect that text chunks for other
       character sets, such as Unicode, eventually will be registered and
       increase gradually in popularity.
-- end second quote ---

gregory
--------------------------------------------------------
He that lives on Hope, dies farting
      -- Benjamin Franklin, Poor Richard's Almanack, 1763
--------------------------------------------------------
Gregory J. Rosmaita <unagi69@concentric.net>
    WebMaster and Minister of Propaganda, VICUG NYC
         <http://www.hicom.net/~oedipus/vicug/index.html>
--------------------------------------------------------

Received on Monday, 7 February 2000 16:31:17 UTC