nn::jpeg::CTR::JpegMpEncoder::InitializeGpsData Member Function

Syntax

#include <nn/jpeg.h>

static void InitializeGpsData(
     GpsData * pGps
);

Parameters

Name Description
out pGps Specifies the GPS IFD (structure used for storing GPS data). The stored data format is easy for the library to process and is different from the binary format that results from encoding.

Return Values

None.

Description

Initializes the structure used for registering GPS IFD data.

The procedure for storing GPS information in the image and storing it is given below.

  1. The application should maintain the GPS IFD structure for storing information and initialize it with this function.
  2. Call the SetGpsLatitude and SetGpsLongitude functions to store GPS information in the structure. Depending on the function, some structure members, such as SetGpsSatellites, only maintain a pointer to the data to store. In this case, you must maintain the data to store until encoding ends.
  3. Once all data has been stored in the structure, be sure to confirm the data by calling the SetGpsData function.
    The encoder object only maintains a pointer to this structure. This structure must therefore be maintained until encoding ends.
  4. Call the encoding function and encode the image.
  5. Whether it succeeds or fails, once the encoding function exits, the structure and data to be stored can be released. To reuse this structure, be sure to re-initialize it with this function.

After initialization, the structure only stores the GPS tag version (2.2 is the default for this library). The version can be changed by calling the SetGpsVersionId function. The system can be instructed not to save the version by calling the ClearGpsVersionId function.

Revision History

2010/10/22
Initial version.

CONFIDENTIAL