~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Source/Metadata/TagConversion.cpp

  • Committer: Stefano Rivera
  • Date: 2010-07-24 15:35:51 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: stefanor@ubuntu.com-20100724153551-6s3fth1653huk31a
Tags: upstream-3.13.1
ImportĀ upstreamĀ versionĀ 3.31.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
                {
175
175
                        unsigned long *pvalue = (unsigned long *)FreeImage_GetTagValue(tag);
176
176
 
177
 
                        sprintf(format, "%p", pvalue[0]);
 
177
                        sprintf(format, "%X", pvalue[0]);
178
178
                        buffer += format;
179
179
                        for(i = 1; i < tag_count; i++) {
180
 
                                sprintf(format, " %p",  pvalue[i]);
 
180
                                sprintf(format, " %X",  pvalue[i]);
181
181
                                buffer += format;
182
182
                        }
183
183
                        break;
841
841
                }
842
842
                break;
843
843
 
 
844
                case TAG_USER_COMMENT:
 
845
                {
 
846
                        // first 8 bytes are used to define an ID code
 
847
                        // we assume this is an ASCII string
 
848
                        const BYTE *userComment = (BYTE*)FreeImage_GetTagValue(tag);
 
849
                        for(DWORD i = 8; i < FreeImage_GetTagLength(tag); i++) {
 
850
                                buffer += userComment[i];
 
851
                        }
 
852
                        buffer += '\0';
 
853
                        return buffer.c_str();
 
854
                }
 
855
                break;
 
856
 
844
857
        }
845
858
 
846
859
        return ConvertAnyTag(tag);