Geeqie-v2.4
lua.cc File Reference

Functions

static int lua_exif_get_datum (lua_State *L)
 Interface for EXIF data. More...
 
static int lua_image_get_date (lua_State *L)
 Get file date of selected image. More...
 
static int lua_image_get_exif (lua_State *L)
 Get exif structure of selected image. More...
 
static int lua_image_get_extension (lua_State *L)
 Get file extension of selected image. More...
 
static int lua_image_get_marks (lua_State *L)
 Get marks of selected image. More...
 
static int lua_image_get_name (lua_State *L)
 Get full filename of selected image. More...
 
static int lua_image_get_path (lua_State *L)
 Get full path of selected image. More...
 
static int lua_image_get_size (lua_State *L)
 Get file size of selected image. More...
 

Variables

static const luaL_Reg exif_methods []
 exif: table and methods
Call by e.g.
<exif-structure>:get_datum()
where <exif-structure> is the output of Image:get_exif() More...
 
static const luaL_Reg image_methods []
 Image: metatable and methods
Call by e.g.
path_name = Image:getpath()
where the keyword Image represents the currently selected image More...
 

Detailed Description

User API consists of the following namespaces:

Image: basic image information

Collection: not implemented

<exif-structure>:get_datum() get single exif parameter

Function Documentation

◆ lua_exif_get_datum()

static int lua_exif_get_datum ( lua_State *  L)
static

Interface for EXIF data.

Parameters
L
Returns
return A single exif tag extracted from a structure output by the Image:get_exif() command

e.g.
exif_structure = Image:get_exif();
DateTimeDigitized = exif_structure:get_datum("Exif.Photo.DateTimeDigitized");

Where return is:
Exif.Photo.DateTimeOriginal = signed integer time_t
Exif.Photo.DateTimeDigitized = signed integer time_t
otherwise char

◆ lua_image_get_date()

static int lua_image_get_date ( lua_State *  L)
static

Get file date of selected image.

Parameters
L
Returns
time_t The file date in Unix timestamp format.

time_t - signed integer which represents the number of seconds since the start of the Unix epoch: midnight UTC of January 1, 1970

◆ lua_image_get_exif()

static int lua_image_get_exif ( lua_State *  L)
static

Get exif structure of selected image.

Parameters
L
Returns
An #ExifData data structure containing the entire exif data

To be used in conjunction with <exif-structure>:get_datum()

◆ lua_image_get_extension()

static int lua_image_get_extension ( lua_State *  L)
static

Get file extension of selected image.

Parameters
L
Returns
char The file extension including preceding dot

◆ lua_image_get_marks()

static int lua_image_get_marks ( lua_State *  L)
static

Get marks of selected image.

Parameters
L
Returns
unsigned integer Bit map of marks set

Bit 0 == Mark 1 etc.

◆ lua_image_get_name()

static int lua_image_get_name ( lua_State *  L)
static

Get full filename of selected image.

Parameters
L
Returns
char The full filename including extension

◆ lua_image_get_path()

static int lua_image_get_path ( lua_State *  L)
static

Get full path of selected image.

Parameters
L
Returns
char The full path of the file, including filename and extension

◆ lua_image_get_size()

static int lua_image_get_size ( lua_State *  L)
static

Get file size of selected image.

Parameters
L
Returns
integer The file size in bytes

Variable Documentation

◆ exif_methods

const luaL_Reg exif_methods[]
static
Initial value:
= {
{"get_datum", lua_exif_get_datum},
{nullptr, nullptr}
}
static int lua_exif_get_datum(lua_State *L)
Interface for EXIF data.
Definition: lua.cc:234

exif: table and methods
Call by e.g.
<exif-structure>:get_datum()
where <exif-structure> is the output of Image:get_exif()

exif_structure = Image:get_exif();
DateTimeDigitized = exif_structure:get_datum("Exif.Photo.DateTimeDigitized");

◆ image_methods

const luaL_Reg image_methods[]
static
Initial value:
= {
{"get_path", lua_image_get_path},
{"get_name", lua_image_get_name},
{"get_extension", lua_image_get_extension},
{"get_date", lua_image_get_date},
{"get_size", lua_image_get_size},
{"get_exif", lua_image_get_exif},
{"get_marks", lua_image_get_marks},
{nullptr, nullptr}
}
static int lua_image_get_exif(lua_State *L)
Get exif structure of selected image.
Definition: lua.cc:93
static int lua_image_get_name(lua_State *L)
Get full filename of selected image.
Definition: lua.cc:134
static int lua_image_get_size(lua_State *L)
Get file size of selected image.
Definition: lua.cc:183
static int lua_image_get_date(lua_State *L)
Get file date of selected image.
Definition: lua.cc:167
static int lua_image_get_path(lua_State *L)
Get full path of selected image.
Definition: lua.cc:118
static int lua_image_get_extension(lua_State *L)
Get file extension of selected image.
Definition: lua.cc:150
static int lua_image_get_marks(lua_State *L)
Get marks of selected image.
Definition: lua.cc:201

Image: metatable and methods
Call by e.g.
path_name = Image:getpath()
where the keyword Image represents the currently selected image