isoiff

Author:
Armin Trattnig
Version:
1.0
Includes:
"MP4Movies.h"
"MP4Atoms.h"

Introduction

Provides tools to process images through iso media file format

Updated:
Monday, November 17, 2014


Functions

ISOIFF_AddImageProperty
ISOIFF_AddImageRelation
ISOIFF_AddImageToMeta
ISOIFF_AddMetaToImage
ISOIFF_CreateImageCollection
ISOIFF_FreeImage
ISOIFF_FreeImageCollection
ISOIFF_FreeMeta
ISOIFF_GetAllImagesWithType
ISOIFF_GetAllMetasWithType
ISOIFF_GetImageData
ISOIFF_GetImageProperties
ISOIFF_GetImagesOfImageWithType
ISOIFF_GetImagesOfMetaWithType
ISOIFF_GetImageType
ISOIFF_GetMetaData
ISOIFF_GetMetasOfImageWithType
ISOIFF_GetMetaType
ISOIFF_NewImage
ISOIFF_NewMeta
ISOIFF_ReadCollectionFromFile
ISOIFF_SetImageAsCover
ISOIFF_WriteCollectionToFile

ISOIFF_AddImageProperty


MP4Err ISOIFF_AddImageProperty (
    ISOIFF_Image image,
    MP4AtomPtr property,
    u8 essential);  
Parameters
image

ISOIFF_Image image to which the property gets added

property

MP4AtomPtr the property, which is added to the image

essential

u8 marks the property as essential for the image

Discussion

Adds a property to the image


ISOIFF_AddImageRelation


MP4Err ISOIFF_AddImageRelation (
    ISOIFF_Image fromImage,
    ISOIFF_Image toImage,
    u32 relationType);  
Parameters
fromImage

The relation points from this image to the toImage

toImage

The relation points to this image from the fromImage

relationType

The 4cc relation type

Discussion

Adds a relation between two images to their collection.


ISOIFF_AddImageToMeta


MP4Err ISOIFF_AddImageToMeta (
    ISOIFF_Meta fromMeta,
    ISOIFF_Image toImage,
    u32 relationType);  
Parameters
fromMeta

The relation points from this meta item to the toImage

toImage

The relation points to this image from the fromMeta

relationType

The 4cc relation type

Discussion

Adds a image to an meta item (This means there will be a relation from the meta item to the image)


ISOIFF_AddMetaToImage


MP4Err ISOIFF_AddMetaToImage (
    ISOIFF_Image fromImage,
    ISOIFF_Meta toMeta,
    u32 relationType);  
Parameters
fromImage

The relation points from this image to the toMeta meta item

toMeta

The relation points to this meta item from the fromImage

relationType

The 4cc relation type

Discussion

Adds a meta item to an image (This means there will be a relation from the image to the meta item)


ISOIFF_CreateImageCollection


MP4Err ISOIFF_CreateImageCollection (
    ISOIFF_ImageCollection *collection,
    u32 brand,
    u32 minorVersion);  
Parameters
collection

This ISOIFF_ImageCollection will be allocated and initialized

brand

The brand of the image collection

minorVersion

The minorversion of the image collection

Discussion

Creates an image collection conforming to ISO Base Media Image File Format.


ISOIFF_FreeImage


MP4Err ISOIFF_FreeImage (
    ISOIFF_Image image);  
Parameters
image

ISOIFF_Image that will be deallocated

Discussion

Deallocates the memory used by an ISOIFF_Image struct


ISOIFF_FreeImageCollection


Parameters
collection

Collection that will be deallocated

Discussion

Deallocates the memory used by an image collection


ISOIFF_FreeMeta


MP4Err ISOIFF_FreeMeta (
    ISOIFF_Meta meta);  
Parameters
meta

ISOIFF_Meta that will be deallocated

Discussion

Deallocates the memory used by an ISOIFF_Meta struct


ISOIFF_GetAllImagesWithType


MP4Err ISOIFF_GetAllImagesWithType (
    ISOIFF_ImageCollection collection,
    u32 type,
    ISOIFF_Image **images,
    u32 *numberOfImagesFound);  
Parameters
collection

The image collection

type

The 4cc type of the images, that will be collected

images

Pointer to an ISOIFF_Image array. Will be allocated and filled with images.

numberOfImagesFound

Number of images in the images array

Discussion

Collects all images of a given type from an image collections and presents the result as an array


ISOIFF_GetAllMetasWithType


MP4Err ISOIFF_GetAllMetasWithType (
    ISOIFF_ImageCollection collection,
    u32 type,
    ISOIFF_Meta **metas,
    u32 *numberOfMetasFound);  
Parameters
collection

The image collection

type

The 4cc type of the meta items, that will be collected

metas

Pointer to an ISOIFF_Meta array. Will be allocated and filled with meta items.

numberOfMetasFound

Number of metas in the metas array

Discussion

Collects all meta items of a given type from an image collections and presents the result as an array


ISOIFF_GetImageData


MP4Err ISOIFF_GetImageData (
    ISOIFF_Image image,
    MP4Handle data);  
Parameters
image

Image with the data requested

data

Will contain the data of the image

Discussion

Gets the data of an image in form of an MP4Handle


ISOIFF_GetImageProperties


MP4Err ISOIFF_GetImageProperties (
    ISOIFF_Image image,
    MP4GenericAtom **properties,
    u32 *propertiesFound);  
Parameters
image

ISOIFF_Image image that has properties

properties

MP4AtomPtr* array of properties of the image

propertiesFound

u32* the amount of properties found for the image

Discussion

Obtains an array of properties from an image


ISOIFF_GetImagesOfImageWithType


MP4Err ISOIFF_GetImagesOfImageWithType (
    ISOIFF_Image fromImage,
    u32 relationType,
    ISOIFF_Image **toImages,
    u32 *numberOfImagesFound);  
Parameters
fromImage

The image from which the relations of the type relationType point to the toImages

relationType

The 4cc relation type

toImages

This array will be allocated and filled with images found for the fromImage's relations

numberOfImagesFound

The number of images in toImages

Discussion

Collects all images that an image points to, with a certain relation type.


ISOIFF_GetImagesOfMetaWithType


MP4Err ISOIFF_GetImagesOfMetaWithType (
    ISOIFF_Meta fromMeta,
    u32 relationType,
    ISOIFF_Image **toImages,
    u32 *numberOfImagesFound);  
Parameters
fromMeta

The meta item from which the relations of the type relationType point to the toImages

relationType

The 4cc relation type

toImages

This array will be allocated and filled with images found for the fromMeta's relations

numberOfImagesFound

The number of images in toImages

Discussion

Collects all images that an meta item points to, with a certain relation type.


ISOIFF_GetImageType


MP4Err ISOIFF_GetImageType (
    ISOIFF_Image image,
    u32 *outType);  
Parameters
image

Image with the type requested

outType

Will contain the 4cc type of the image

Discussion

Gets the 4cc type of an image


ISOIFF_GetMetaData


MP4Err ISOIFF_GetMetaData (
    ISOIFF_Meta meta,
    MP4Handle data);  
Parameters
meta

Meta itme with the data requested

data

Will contain the data of the meta item

Discussion

Gets the data of an meta item in form of an MP4Handle


ISOIFF_GetMetasOfImageWithType


MP4Err ISOIFF_GetMetasOfImageWithType (
    ISOIFF_Image fromImage,
    u32 relationType,
    ISOIFF_Meta **toMetas,
    u32 *numberOfMetasFound);  
Parameters
fromImage

The image from which the relations of the type relationType point to the toMetas

relationType

The 4cc relation type

toMetas

This array will be allocated and filled with meta items found for the fromImage's relations

numberOfMetasFound

The number of meta items in toMetas

Discussion

Collects all meta itmes that an image points to, with a certain relation type.


ISOIFF_GetMetaType


MP4Err ISOIFF_GetMetaType (
    ISOIFF_Meta meta,
    u32 *outType);  
Parameters
meta

Meta item with the type requested

outType

Will contain the 4cc type of the meta item

Discussion

Gets the 4cc type of an meta item


ISOIFF_NewImage


MP4Err ISOIFF_NewImage (
    ISOIFF_ImageCollection collection,
    ISOIFF_Image *image,
    u32 type,
    MP4Handle data);  
Parameters
collection

The collection to which the image will be added to

image

The image that will be allocated and created

type

The type of the image in 4CC

Discussion

Creates and adds an image with a given type and data to an image collection


ISOIFF_NewMeta


MP4Err ISOIFF_NewMeta (
    ISOIFF_ImageCollection collection,
    ISOIFF_Meta *meta,
    u32 type,
    MP4Handle data);  
Parameters
collection

The collection to which the meta item will be added to

meta

The meta item that will be allocated and created

type

The type of the meta item in 4CC

Discussion

Creates and adds a meta item with a given type and data to an image collection


ISOIFF_ReadCollectionFromFile


MP4Err ISOIFF_ReadCollectionFromFile (
    ISOIFF_ImageCollection *collection,
    const char *filename);  
Parameters
collection

The image collection

filename

Path ot the file

Discussion

Reads an image collection from a file


ISOIFF_SetImageAsCover


Parameters
image

Image, which will be set as cover image

Discussion

Sets an image as the cover image of its collection. (This means it will become the primary item)


ISOIFF_WriteCollectionToFile


MP4Err ISOIFF_WriteCollectionToFile (
    ISOIFF_ImageCollection collection,
    const char *filename);  
Parameters
collection

The image collection

filename

Path ot the file

Discussion

Writes an image collection to a file


Typedefs

ISOIFF_Image

Represents an image contained in an ISO Media Based Image File Format image collection

ISOIFF_ImageCollection

Represents a collection of images (Stored conforming to ISO Media Based Image File Format)

ISOIFF_Meta

Represents an meta item contained in an ISO Media Based Image File Format image collection


ISOIFF_Image


Represents an image contained in an ISO Media Based Image File Format image collection

typedef struct ISOIFF_ImageS *ISOIFF_Image;  

ISOIFF_ImageCollection


Represents a collection of images (Stored conforming to ISO Media Based Image File Format)

typedef struct ISOIFF_ImageCollectionS *ISOIFF_ImageCollection;  

ISOIFF_Meta


Represents an meta item contained in an ISO Media Based Image File Format image collection

typedef struct ISOIFF_MetaS *ISOIFF_Meta;