MACSCRPT Archives

May 2003

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bart Lateur <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 26 May 2003 11:29:09 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
On Sun, 25 May 2003 14:28:25 +0100, Bill Bedford wrote:

>Can anyone suggest a way of automating the writing of comments fields
>in jpegs?

If at all possible, you should avoid rewriting the image of the JPEG
file with a graphics program. You'll loose image quality.

If at all possible, you should try to parse the JPEG file into (enough)
blocks), and insert a comment block at a break point. That sounds like a
job for Perl, for example. Ah, look, there exists a module to do the
nitty gritty for you: JPEG::Comment:

        <http://search.cpan.org/author/IFROL/JPEG-Comment-02/>

If you're not planning on using Perl but rather write your own, you
could use it as an example. There's only one function there, of 26
lines.

   HTH,
   Bart.

ATOM RSS1 RSS2