Pages

Pages — Functions for handling images with multiple pages.

Functions

Includes

#include <abydos.h>

Description

Some image formats can caontain multiple pages. The definition of pages in this context is if the image contains more than one sub image, which are not frames of an animation, layers of the same image nor the same image in different sizes. It could to subimages which are defined as pages by the format (such as in the case of PDF documents) but it could also be formats that simply stores severaral images together in a file in a more loosely defined manner. Some formats may have an internal organization of the sub images in the form of a tree. But abydos will in that case always fletten the tree and index the pages sequentially.

Functions

abydos_get_page_count ()

int
abydos_get_page_count (abydos_t *ar);

Get the number of pages of an image.

Parameters

ar

an abydos_t

 

abydos_get_page ()

int
abydos_get_page (abydos_t *ar);

Returns the index of the currently selected page.

Parameters

ar

an abydos_t

 

Returns

The currently selected page, starting from 0.


abydos_set_page ()

void
abydos_set_page (abydos_t *ar,
                 int page);

Selects a page. If the page is out of range, a valid, but otherwise undefined page will be selected.

Parameters

ar

an abydos_t

 

page

Page starting at 0

 

abydos_set_page_default ()

void
abydos_set_page_default (abydos_t *ar);

Selectes the page that is defined as the default page (or the first page if no default page is defined). Call this function if you intend to show only one page. (It is currently assumed that you are going to show all one by one so the first page is initially selected, but that may change.)

Parameters

ar

an abydos_t