libopenraw  0.3.7
Functions

Access the thumbnails. More...

Functions

or_error or_get_extract_thumbnail (const char *filename, uint32_t preferred_size, ORThumbnailRef *thumb)
 Extract thumbnail for raw file. More...
 
ORThumbnailRef or_thumbnail_new (void)
 Allocate a Thumbnail object. More...
 
or_error or_thumbnail_release (ORThumbnailRef thumb)
 Release a Thumbnail object. More...
 
or_data_type or_thumbnail_format (ORThumbnailRef thumb)
 Get the thumbnail format. More...
 
void * or_thumbnail_data (ORThumbnailRef thumb)
 Get the pointer to the data. More...
 
size_t or_thumbnail_data_size (ORThumbnailRef thumb)
 Get the data size. More...
 
void or_thumbnail_dimensions (ORThumbnailRef thumb, uint32_t *x, uint32_t *y)
 Get the Thumbnail dimensions in pixels. More...
 

Detailed Description

Access the thumbnails.

Function Documentation

◆ or_get_extract_thumbnail()

or_error or_get_extract_thumbnail ( const char *  filename,
uint32_t  preferred_size,
ORThumbnailRef thumb 
)

Extract thumbnail for raw file.

See or_rawfile_get_thumbnail() for details. Will return OR_ERROR_CANT_OPEN if the file can't be open.

Parameters
filenameThe path to the file to extract from.
preferred_sizePreferred thumbnail size.
[in/out]thumb The thumbnail object ref to store it in If the ref is NULL, then a new one is allocated. It is the responsibility of the caller to release it.
Returns
An error code.

Definition at line 40 of file capi.cpp.

References OR_ERROR_NONE.

◆ or_thumbnail_data()

void* or_thumbnail_data ( ORThumbnailRef  thumb)

Get the pointer to the data.

See or_thumbnail_data_size() to know the size.

Returns
A pointer, owned by the Thumbnail object. May be NULL.

Definition at line 76 of file capi.cpp.

Referenced by OrDiag::extractThumb().

◆ or_thumbnail_data_size()

size_t or_thumbnail_data_size ( ORThumbnailRef  thumb)

Get the data size.

Returns
The data size.

Definition at line 82 of file capi.cpp.

Referenced by OrDiag::dumpPreviews(), and OrDiag::extractThumb().

◆ or_thumbnail_dimensions()

void or_thumbnail_dimensions ( ORThumbnailRef  thumb,
uint32_t *  x,
uint32_t *  y 
)

Get the Thumbnail dimensions in pixels.

Parameters
[out]xThe horizontal dimension. Can be NULL.
[out]yThe vertical dimension. Can be NULL.

Definition at line 88 of file capi.cpp.

References OpenRaw::BitmapData::height(), and OpenRaw::BitmapData::width().

Referenced by OrDiag::dumpPreviews(), and OrDiag::extractThumb().

◆ or_thumbnail_format()

or_data_type or_thumbnail_format ( ORThumbnailRef  thumb)

Get the thumbnail format.

Returns
A data type indicating the format.

Definition at line 70 of file capi.cpp.

Referenced by OrDiag::dumpPreviews(), and OrDiag::extractThumb().

◆ or_thumbnail_new()

ORThumbnailRef or_thumbnail_new ( void  )

Allocate a Thumbnail object.

Returns
A Thumbnail object. Use or_thumbnail_release() to free it.

Definition at line 53 of file capi.cpp.

Referenced by OrDiag::dumpPreviews().

◆ or_thumbnail_release()

or_error or_thumbnail_release ( ORThumbnailRef  thumb)

Release a Thumbnail object.

Parameters
thumbThe Thumbnail objet to release.
Returns
An error code. OR_ERROR_NONE in case of success, and OR_ERROR_NOTAREF if a NULL pointer is passed.

Definition at line 60 of file capi.cpp.

References OR_ERROR_NONE, and OR_ERROR_NOTAREF.

Referenced by OrDiag::dumpPreviews().