AsImage

AsImage — Object representing a single image used in a screenshot.

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── AsImage

Includes

#include <appstream-glib.h>

Description

Screenshot may have multiple versions of an image in different resolutions or aspect ratios. This object allows access to the location and size of a single image.

See also: AsScreenshot

Functions

as_image_new ()

AsImage *
as_image_new (void);

Creates a new AsImage.

Returns

a AsImage.

[transfer full]

Since 0.1.0


as_image_kind_from_string ()

AsImageKind
as_image_kind_from_string (const gchar *kind);

Converts the text representation to an enumerated value.

Parameters

kind

the string.

 

Returns

a AsImageKind, or AS_IMAGE_KIND_UNKNOWN for unknown.

[transfer full]

Since 0.1.0


as_image_kind_to_string ()

const gchar *
as_image_kind_to_string (AsImageKind kind);

Converts the enumerated value to an text representation.

Parameters

kind

the AsImageKind.

 

Returns

string version of kind

Since 0.1.0


as_image_get_url ()

const gchar *
as_image_get_url (AsImage *image);

Gets the full qualified URL for the image, usually pointing at some mirror.

Parameters

image

a AsImage instance.

 

Returns

URL

Since 0.1.0


as_image_get_width ()

guint
as_image_get_width (AsImage *image);

Gets the image width.

Parameters

image

a AsImage instance.

 

Returns

width in pixels

Since 0.1.0


as_image_get_height ()

guint
as_image_get_height (AsImage *image);

Gets the image height.

Parameters

image

a AsImage instance.

 

Returns

height in pixels

Since 0.1.0


as_image_get_kind ()

AsImageKind
as_image_get_kind (AsImage *image);

Gets the image kind.

Parameters

image

a AsImage instance.

 

Returns

the AsImageKind

Since 0.1.0


as_image_set_url ()

void
as_image_set_url (AsImage *image,
                  const gchar *url,
                  gssize url_len);

Sets the fully-qualified mirror URL to use for the image.

Parameters

image

a AsImage instance.

 

url

the URL.

 

url_len

the size of url , or -1 if NULL-terminated.

 

Since 0.1.0


as_image_set_width ()

void
as_image_set_width (AsImage *image,
                    guint width);

Sets the image width.

Parameters

image

a AsImage instance.

 

width

the width in pixels.

 

Since 0.1.0


as_image_set_height ()

void
as_image_set_height (AsImage *image,
                     guint height);

Sets the image height.

Parameters

image

a AsImage instance.

 

height

the height in pixels.

 

Since 0.1.0


as_image_set_kind ()

void
as_image_set_kind (AsImage *image,
                   AsImageKind kind);

Sets the image kind.

Parameters

image

a AsImage instance.

 

kind

the AsImageKind, e.g. AS_IMAGE_KIND_THUMBNAIL.

 

Since 0.1.0

Types and Values

enum AsImageKind

The image type.

Members

AS_IMAGE_KIND_UNKNOWN

Type invalid or not known

 

AS_IMAGE_KIND_SOURCE

The source image at full resolution

 

AS_IMAGE_KIND_THUMBNAIL

A thumbnail at reduced resolution