Hi,
Michal Čihař wrote:
Hi
Dne Sun, 08 Jun 2008 22:30:33 +0200
matthieu castet <[EMAIL PROTECTED]> napsal(a):
my camera (canon a710) generate empty exif comment tag, by filling it with 255
0. This should be to allow the modify it without rewritting all the exif
metadata.
But python exif library or lazygal doesn't strip these null caracter in
the string. This result in garbage put in the html page.
A solution could be to strip('\0') in get_exif_string.
Thanks, I just sent this change for inclusion in upstream, will be
fixed in next version.
There is more problem with exif comment : the string can be not ascii.
The first character of the string indicate the charset [1], it should be
parsed and removed of the final string.
In order genshi template works we need to convert the string to unicode [2].
[1] charset="Unicode" Marseille : Cathédrale Sainte-Marie-Majeure
[2]
http://genshi.edgewall.org/wiki/GenshiFaq#WhydoesGenshiraiseaUnicodeDecodeErrorwhenItrytorendernon-ASCIIstrings
PS : lazygal don't support old exif comment Exif.Image.ImageDescription
http://www.exiv2.org/tags.html
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]