"UNICODE ASCII" in TagExifUserComment
"UNICODE ASCII" in TagExifUserComment
Hello, I'm having a weird problem.
I'm currently writing and reading Exif codes without problems using GdPictureImaging.
However I need to write a number into the TagExifUserComment field (don't ask why, customer request).
The number is written but using any Exif viewer (Opanda, Irfanview...) the value found is "UNICODE ASCII <number>" and the type of the field is "UNDEFINED".
if I do the same in a field like "tagArtist" I don't have this result, it seems to be something related to TagExifUserComment only. Lucky me, that's the field I need.
I'm writing the exif code using a line like:
TagSetValueString(imgID, GdPicture.Tags.TagExifUserComment, TagType.TagTypeASCII, number.ToString());
This strange behaviour causes a problem, since the other applications I'm interfacing with tries to read a string ans parse it as a number.
Any hint?
Thank you.
I'm currently writing and reading Exif codes without problems using GdPictureImaging.
However I need to write a number into the TagExifUserComment field (don't ask why, customer request).
The number is written but using any Exif viewer (Opanda, Irfanview...) the value found is "UNICODE ASCII <number>" and the type of the field is "UNDEFINED".
if I do the same in a field like "tagArtist" I don't have this result, it seems to be something related to TagExifUserComment only. Lucky me, that's the field I need.
I'm writing the exif code using a line like:
TagSetValueString(imgID, GdPicture.Tags.TagExifUserComment, TagType.TagTypeASCII, number.ToString());
This strange behaviour causes a problem, since the other applications I'm interfacing with tries to read a string ans parse it as a number.
Any hint?
Thank you.
Re: "UNICODE ASCII" in TagExifUserComment
Hello there,
Well, everything seems right!
The TIFF Tag UserComment should be of the type UNDEFINED and containing 8 first bytes defining the encoding. And GdPicture correctly do that.
From the specs:
Cheers!
Loïc
Well, everything seems right!
The TIFF Tag UserComment should be of the type UNDEFINED and containing 8 first bytes defining the encoding. And GdPicture correctly do that.
From the specs:
If you attach an example of your image I will confirm you if there any ano possible issue or not.IFD Exif
Code 37510 (hex 0x9286)
Name UserComment
Type UNDEFINED
Count N
Default None
The specification defines these possible values for the first 8 bytes of the tag data:
ASCII (hex 41, 53, 43, 49, 49, 00, 00, 00): ITU-T T.50 IA5
JIS (hex 4A, 49, 53, 00, 00, 00, 00, 00): JIS X208-1990
Unicode (hex 55, 4E, 49, 43, 4F, 44, 45, 00): Unicode Standard
Undefined (hex 00, 00, 00, 00, 00, 00, 00, 00): Undefined
Cheers!
Loïc
Re: "UNICODE ASCII" in TagExifUserComment
Thanks for the answer.
Perhaps I'm doing something wrong, but if I try to set the tag as TagType.TagTypeUndefined, no value is saved at all.
But if I use a TagType.TagTypeASCII I see, in the resulting hex, this prefix: "UNICODE ASCII".
So, not only UNICODE or ASCII, but both of them.
Perhaps I'm doing something wrong, but if I try to set the tag as TagType.TagTypeUndefined, no value is saved at all.
But if I use a TagType.TagTypeASCII I see, in the resulting hex, this prefix: "UNICODE ASCII".
So, not only UNICODE or ASCII, but both of them.
Re: "UNICODE ASCII" in TagExifUserComment
Hello,
Could you also attach an image with such data?
Kind regards,
Loïc
Could you explain further how you process to get this result?But if I use a TagType.TagTypeASCII I see, in the resulting hex, this prefix: "UNICODE ASCII"
Could you also attach an image with such data?
Kind regards,
Loïc
Re: "UNICODE ASCII" in TagExifUserComment
With this line of code:
I get this in Opanda Exif reader:
Code: Select all
gdi.TagSetValueString(imgId, Tags.TagExifUserComment, TagType.TagTypeASCII, "0");
Re: "UNICODE ASCII" in TagExifUserComment
I'm trying to use byte[] instead of string.
The "ASCII" prefix is no more there, but the value is printed twice... Here, as example, with value = "491,678"
I'm lost
Code: Select all
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
byte[] bytes = enc.GetBytes(value);
gdi.TagSetValueBytes(imgId, Tags.TagExifUserComment, TagType.TagTypeASCII, bytes);
I'm lost
Re: "UNICODE ASCII" in TagExifUserComment
I forgot to say that I'm using GdPicture.NET.dll ver.7.4.0.1 with Visual Studio 2010 on Windows 7 64 bit
Re: "UNICODE ASCII" in TagExifUserComment
I can't understand why there is Unicode displayed. I think it can be a bug with Opanda Exif Viewer. I've checked the source code of GdPicture 7 and I don't find any possible problem.
That said, as I asked before I really need a produced image from your side to advice more.
In case you want to use the TagSetValueBytes, you have to provide an array of bytes that meet the specs, meaning with the 8 bytes of header.
Kind regards,
Loïc
That said, as I asked before I really need a produced image from your side to advice more.
In case you want to use the TagSetValueBytes, you have to provide an array of bytes that meet the specs, meaning with the 8 bytes of header.
Kind regards,
Loïc
Re: "UNICODE ASCII" in TagExifUserComment
I thought about Opanda too, but Irfanview show the same, and even Windows file properties.
(Note: perhaps only few people are following the specs... that would not be a big news)
However here's one image:
http://www.licantropi.it/TEO_0002.jpg
Thank you.
(Note: perhaps only few people are following the specs... that would not be a big news)
However here's one image:
http://www.licantropi.it/TEO_0002.jpg
Thank you.
Who is online
Users browsing this forum: No registered users and 1 guest