Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 11:15, 30 April 2008.

TSS000919 - Displaying EXIF version information

From Forum Nokia Wiki


ID TSS000919 Creation date April 30, 2008
Platform S60 3rd Edition  Devices All (S60 3rd Edition) 
Category Symbian C++  Subcategory Imaging, EXIF 


Description

EXIF version information in image metadata is stored as a 4-byte (32-bit integer) ASCII string, which is not NULL-terminated. The following solution shows how to extract this information using CExifRead and convert it to a unicode descriptor for displaying purposes.

Solution

 #define KEXIFVersionInfoLength 4
 
 #include <exifread.h>     // for CExifRead (ExifLib.lib)
 #include <utf.h>          // for CnvUtfConverter (charconv.lib)
 // imageData is a buffer containing the image data
 CExifRead* exifRead = CExifRead::NewL( imageData );
 CleanupStack::PushL(exifRead);
 
 TUint32 exifVersion = 0;
 TBuf8<KEXIFVersionInfoLength> exifVerDes8;
 TBuf<KEXIFVersionInfoLength> exifVerDes;
 TInt err = exifRead->GetExifVersion( exifVersion );
 
 CleanupStack::PopAndDestroy(2); // exifRead, imageData
   
 if(err == KErrNone)
   {
   // Copy to a temporary UTF-8 string and convert to unicode descriptor
   exifVerDes8.Copy( (TUint8*)&exifVersion, KEXIFVersionInfoLength );  
   CnvUtfConverter::ConvertToUnicodeFromUtf8( exifVerDes, exifVerDes8 );
   }
 else
   {
   // Error handling
   }
Related Discussions
Thread Thread Starter Forum Replies Last Post
SOLUTION - thumbnails jerkolino Mobile Java Media (Graphics & Sounds) 4 2006-05-24 06:31
displaying animated gif,jpeg,jpg images on nokia mobile simulator version 3.0 amar_buchade General Browsing 1 2004-06-22 07:31
Product IDs mikkyt General Symbian C++ 5 2004-09-24 09:56
Image is not displaying dotcdotc Mobile Java General 2 2004-04-13 12:26
Any one running series 40 emulator fmhunter Mobile Java Tools & SDKs 4 2002-08-15 19:39
 
Powered by MediaWiki