GrlMediaImage

GrlMediaImage — A multimedia data for image

Synopsis

#include <grilo.h>

struct              GrlMediaImage;
struct              GrlMediaImageClass;
GrlMedia *          grl_media_image_new                 (void);
void                grl_media_image_add_url_data        (GrlMediaImage *image,
                                                         const gchar *url,
                                                         const gchar *mime,
                                                         gint width,
                                                         gint height);
const gchar *       grl_media_image_get_camera_model    (GrlMediaImage *image);
gfloat              grl_media_image_get_exposure_time   (GrlMediaImage *image);
const gchar *       grl_media_image_get_flash_used      (GrlMediaImage *image);
gint                grl_media_image_get_height          (GrlMediaImage *image);
gfloat              grl_media_image_get_iso_speed       (GrlMediaImage *image);
gint                grl_media_image_get_orientation     (GrlMediaImage *image);
const gchar *       grl_media_image_get_url_data        (GrlMediaImage *image,
                                                         gchar **mime,
                                                         gint *width,
                                                         gint *height);
const gchar *       grl_media_image_get_url_data_nth    (GrlMediaImage *image,
                                                         guint index,
                                                         gchar **mime,
                                                         gint *width,
                                                         gint *height);
gint                grl_media_image_get_width           (GrlMediaImage *image);
void                grl_media_image_set_camera_model    (GrlMediaImage *image,
                                                         const gchar *camera_model);
void                grl_media_image_set_exposure_time   (GrlMediaImage *image,
                                                         gfloat exposure_time);
void                grl_media_image_set_flash_used      (GrlMediaImage *image,
                                                         const gchar *flash_used);
void                grl_media_image_set_height          (GrlMediaImage *image,
                                                         gint height);
void                grl_media_image_set_iso_speed       (GrlMediaImage *image,
                                                         gfloat iso_speed);
void                grl_media_image_set_orientation     (GrlMediaImage *image,
                                                         gint orientation);
void                grl_media_image_set_size            (GrlMediaImage *image,
                                                         gint width,
                                                         gint height);
void                grl_media_image_set_url_data        (GrlMediaImage *image,
                                                         const gchar *url,
                                                         const gchar *mime,
                                                         gint width,
                                                         gint height);
void                grl_media_image_set_width           (GrlMediaImage *image,
                                                         gint width);

Object Hierarchy

  GObject
   +----GrlData
         +----GrlMedia
               +----GrlMediaImage

Description

This high level class represents an image multimedia item. It has methods to set and get the size, width and height properties

Details

struct GrlMediaImage

struct GrlMediaImage;

struct GrlMediaImageClass

struct GrlMediaImageClass {
  GrlMediaClass parent_class;
};

Grilo Media image Class

GrlMediaClass parent_class;

the parent class structure

grl_media_image_new ()

GrlMedia *          grl_media_image_new                 (void);

Creates a new data image object.

Returns :

a newly-allocated data image.

Since 0.1.4


grl_media_image_add_url_data ()

void                grl_media_image_add_url_data        (GrlMediaImage *image,
                                                         const gchar *url,
                                                         const gchar *mime,
                                                         gint width,
                                                         gint height);

Sets all the keys related with the URL of a media resource and adds it to image (useful for resources with more than one URL).

image :

the image instance

url :

a image's url

mime :

image mime-type

width :

image width, or -1 to ignore

height :

image height, or -1 to ignore

Since 0.1.10


grl_media_image_get_camera_model ()

const gchar *       grl_media_image_get_camera_model    (GrlMediaImage *image);

image :

the image instance

Returns :

model of camera used to take picture

Since 0.1.12


grl_media_image_get_exposure_time ()

gfloat              grl_media_image_get_exposure_time   (GrlMediaImage *image);

image :

the image instance

Returns :

picture's exposure time

Since 0.1.12


grl_media_image_get_flash_used ()

const gchar *       grl_media_image_get_flash_used      (GrlMediaImage *image);

image :

the image instance

Returns :

whether the flash was used See http://library.gnome.org/devel/ontology/unstable/nmm-classes.htmlnmm-Flash

Since 0.1.12


grl_media_image_get_height ()

gint                grl_media_image_get_height          (GrlMediaImage *image);

image :

the image instance

Returns :

the height of the image

Since 0.1.4


grl_media_image_get_iso_speed ()

gfloat              grl_media_image_get_iso_speed       (GrlMediaImage *image);

image :

the image instance

Returns :

picture's iso speed

Since 0.1.12


grl_media_image_get_orientation ()

gint                grl_media_image_get_orientation     (GrlMediaImage *image);

image :

the image instance

Returns :

degrees clockwise orientation of the picture

Since 0.1.12


grl_media_image_get_url_data ()

const gchar *       grl_media_image_get_url_data        (GrlMediaImage *image,
                                                         gchar **mime,
                                                         gint *width,
                                                         gint *height);

image :

the image instance

mime :

the url mime-type, or NULL to ignore. [out][transfer none]

width :

the width, or NULL to ignore

height :

the height, or NULL to ignore

Returns :

all the keys related with the URL of an image resource in one go.

Since 0.1.10


grl_media_image_get_url_data_nth ()

const gchar *       grl_media_image_get_url_data_nth    (GrlMediaImage *image,
                                                         guint index,
                                                         gchar **mime,
                                                         gint *width,
                                                         gint *height);

image :

the image instance

index :

element to retrieve

mime :

the url mime-type, or NULL to ignore. [out][transfer none]

width :

the width, or NULL to ignore

height :

the height, or NULL to ignore

Returns :

all the keys related with the URL number index of an image resource in one go.

Since 0.1.10


grl_media_image_get_width ()

gint                grl_media_image_get_width           (GrlMediaImage *image);

image :

The image instance

Returns :

the width of the image

Since 0.1.4


grl_media_image_set_camera_model ()

void                grl_media_image_set_camera_model    (GrlMediaImage *image,
                                                         const gchar *camera_model);

grl_media_image_set_exposure_time ()

void                grl_media_image_set_exposure_time   (GrlMediaImage *image,
                                                         gfloat exposure_time);

grl_media_image_set_flash_used ()

void                grl_media_image_set_flash_used      (GrlMediaImage *image,
                                                         const gchar *flash_used);

grl_media_image_set_height ()

void                grl_media_image_set_height          (GrlMediaImage *image,
                                                         gint height);

Set the height of the image

image :

the image instance

height :

the image's height

Since 0.1.4


grl_media_image_set_iso_speed ()

void                grl_media_image_set_iso_speed       (GrlMediaImage *image,
                                                         gfloat iso_speed);

Set the iso_speed of the image

image :

the image instance

iso_speed :

picture's iso speed

Since 0.1.12


grl_media_image_set_orientation ()

void                grl_media_image_set_orientation     (GrlMediaImage *image,
                                                         gint orientation);

Set the orientation of the image

image :

the image instance

orientation :

degrees clockwise orientation of the picture

Since 0.1.12


grl_media_image_set_size ()

void                grl_media_image_set_size            (GrlMediaImage *image,
                                                         gint width,
                                                         gint height);

Set the size of the image

image :

the image instance

width :

the image's width

height :

the image's height

Since 0.1.4


grl_media_image_set_url_data ()

void                grl_media_image_set_url_data        (GrlMediaImage *image,
                                                         const gchar *url,
                                                         const gchar *mime,
                                                         gint width,
                                                         gint height);

Sets all the keys related with the URL of an image resource in one go.

image :

the media instance

url :

the image's url

mime :

image mime-type

width :

image width, or -1 to ignore

height :

image height, or -1 to ignore

Since 0.1.10


grl_media_image_set_width ()

void                grl_media_image_set_width           (GrlMediaImage *image,
                                                         gint width);

Set the width of the image

image :

the image instance

width :

the image's width

Since 0.1.4

See Also

GrlConfig, GrlMediaBox, GrlMediaAudio, GrlMediaVideo