Home | History | Annotate | Download | only in source
      1 /*****************************************************************************/
      2 // Copyright 2006 Adobe Systems Incorporated
      3 // All Rights Reserved.
      4 //
      5 // NOTICE:  Adobe permits you to use, modify, and distribute this file in
      6 // accordance with the terms of the Adobe license agreement accompanying it.
      7 /*****************************************************************************/
      8 
      9 /* $Id: //mondo/dng_sdk_1_4/dng_sdk/source/dng_tag_types.cpp#1 $ */
     10 /* $DateTime: 2012/05/30 13:28:51 $ */
     11 /* $Change: 832332 $ */
     12 /* $Author: tknoll $ */
     13 
     14 /*****************************************************************************/
     15 
     16 #include "dng_tag_types.h"
     17 
     18 /*****************************************************************************/
     19 
     20 uint32 TagTypeSize (uint32 tagType)
     21 	{
     22 
     23 	switch (tagType)
     24 		{
     25 
     26 		case ttByte:
     27 		case ttAscii:
     28 		case ttSByte:
     29 		case ttUndefined:
     30 			{
     31 			return 1;
     32 			}
     33 
     34 		case ttShort:
     35 		case ttSShort:
     36 		case ttUnicode:
     37 			{
     38 			return 2;
     39 			}
     40 
     41 		case ttLong:
     42 		case ttSLong:
     43 		case ttFloat:
     44 		case ttIFD:
     45 			{
     46 			return 4;
     47 			}
     48 
     49 		case ttRational:
     50 		case ttDouble:
     51 		case ttSRational:
     52 		case ttComplex:
     53 			{
     54 			return 8;
     55 			}
     56 
     57 		default:
     58 			break;
     59 
     60 		}
     61 
     62 	return 0;
     63 
     64 	}
     65 
     66 /*****************************************************************************/
     67