Re: tcllib jpeg package and JPEG comments ...
- From: "MartinLemburg@UGS" <martin.lemburg.ugs@xxxxxxx>
- Date: 29 May 2007 09:06:56 -0700
Hello again,
I went now experimenting the other way, writing comments with the jpeg
package like this:
% package require jpeg
0.3
% puts '[jpeg::getComments $fileName]'
''
% jpeg::addComment $fileName "abc"
% jpeg::addComment $fileName "def"
% puts '[jpeg::getComments $fileName]'
'abc def'
Then I opened the JPEG file with IrfanView, saved the non-changed
comment and reread the comment inside the tcl shell:
% puts '[jpeg::getComments $fileName]'
def } def'
% puts '[string map {"\r" "\n"} [jpeg::getComments $fileName]]'
'{abc
def } def'
% scan [string index [lindex [jpeg::getComments $fileName] 0] end]
%c
0
I know, that IrfanView may handle the comments in a wrong way, but
currently I don't have any other bitmap application allowing to view
or to change the JPEG comments!
Can somebody help?
Thanks and best regards,
Martin
On May 29, 5:46 pm, "MartinLemburg@UGS" <martin.lemburg....@xxxxxxx>
wrote:
Hello,
I used IrfanView to put a comment to a JPEG file and afterwards I used
the tcllib jpeg package to access this comment like this:
% ::jpeg::getComments $fileName
...
I realized, that if the comment has line breaks, the returned comment
contains "\r" (CarriageReturns) instead of newlines.
And at the end of the comment there is an ASCII 0.
Even being confused about the procedure name "getComments" and the
help text:
Returns a list containing all the JPEG comments found in the file.
Throws an error if file is not a valid JPEG image.
I ask myself, if I have really understood this JPEG comment thing.
Can I have more than one? Does the "\r" instead of "\n" and the "\0"
have undocumentated reasons?
Thanks for any thought and hint!
Best regards,
Martin
.
- Follow-Ups:
- Re: tcllib jpeg package and JPEG comments ...
- From: Uwe Klein
- Re: tcllib jpeg package and JPEG comments ...
- From: aaronf
- Re: tcllib jpeg package and JPEG comments ...
- References:
- tcllib jpeg package and JPEG comments ...
- From: MartinLemburg@UGS
- tcllib jpeg package and JPEG comments ...
- Prev by Date: Re: What's the difference in this "string match"ing ...
- Next by Date: Re: What's the difference in this "string match"ing ...
- Previous by thread: tcllib jpeg package and JPEG comments ...
- Next by thread: Re: tcllib jpeg package and JPEG comments ...
- Index(es):
Relevant Pages
|