Celartem::MetadataUtils Struct Reference

#include <pxl_metadata.h>

List of all members.

Public Types

enum  ResolutionUnit { Default = 1, Inch = 2, Cm = 3, Meter = 4 }

Static Public Member Functions

static TIFF_RATIONAL convResUnit (TIFF_RATIONAL inRes, ResolutionUnit inInputResUnit, ResolutionUnit inOutputResUnit)
static TIFF_RATIONAL getXResolution (const DataStore *inDataStore, ResolutionUnit inResUnit=Default)
static TIFF_RATIONAL getYResolution (const DataStore *inDataStore, ResolutionUnit inResUnit=Default)
static u16 getResolutionUnit (const DataStore *inDataStore)


Detailed Description

MetadataUtils provides several functions that eases manipulation of metadata.

Definition at line 1068 of file pxl_metadata.h.


Member Enumeration Documentation

enum Celartem::MetadataUtils::ResolutionUnit

The resolution unit used with getXResolution and getYResolution.

Enumerator:
Default  Use the unit specified in the "ResolutionUnit".
Inch  Inch.
Cm  cm.
Meter  Meter (for Windows Bitmap).

Definition at line 1074 of file pxl_metadata.h.


Member Function Documentation

static TIFF_RATIONAL Celartem::MetadataUtils::convResUnit ( TIFF_RATIONAL  inRes,
ResolutionUnit  inInputResUnit,
ResolutionUnit  inOutputResUnit 
) [inline, static]

This function converts the resolution unit of the specified resolution value.

Parameters:
inRes A Resolution Value.
inInputResUnit The unit of the input resolution value.
inOutputResUnit The unit of the output resolution value.
Returns:
Resolution in the specified resolution unit.

Definition at line 1094 of file pxl_metadata.h.

Referenced by getXResolution(), and getYResolution().

static TIFF_RATIONAL Celartem::MetadataUtils::getXResolution ( const DataStore inDataStore,
ResolutionUnit  inResUnit = Default 
) [inline, static]

This function calculates the horizontal resolution using XResolution(292) and ResolutionUnit(296) extracted from the specified DataStore instance. If these tags are not available, this function returns the value corresponding to 72dpi.

Parameters:
inDataStore The DataStore instance.
inResUnit The resolution unit to use.
Returns:
The horizontal resolution in TIFF_RATIONAL.

Definition at line 1140 of file pxl_metadata.h.

static TIFF_RATIONAL Celartem::MetadataUtils::getYResolution ( const DataStore inDataStore,
ResolutionUnit  inResUnit = Default 
) [inline, static]

This function calculates the vertical resolution using YResolution(293) and ResolutionUnit(296) extracted from the specified DataStore instance. If these tags are not available, this function returns the value corresponding to 72dpi.

Parameters:
inDataStore The DataStore instance.
inResUnit The resolution unit to use.
Returns:
The vertical resolution in TIFF_RATIONAL.

Definition at line 1164 of file pxl_metadata.h.

static u16 Celartem::MetadataUtils::getResolutionUnit ( const DataStore inDataStore  )  [inline, static]

This function obtains ResolutionUnit(296) from the specified DataStore instance. If the tag is not available, this function returns Inch.
Anyway, this function never return values other than Inch or Cm.

Definition at line 1181 of file pxl_metadata.h.


The documentation for this struct was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:12 2008.