|
lensfun 0.3.4.0
|
These functions will help handling basic structures of the library. More...
Macros | |
| #define | LF_VERSION_MAJOR 0 |
| Major library version number. | |
| #define | LF_VERSION_MINOR 3 |
| Minor library version number. | |
| #define | LF_VERSION_MICRO 4 |
| Library micro version number. | |
| #define | LF_VERSION_BUGFIX 0 |
| Library bugfix number. | |
| #define | LF_VERSION ((LF_VERSION_MAJOR << 24) | (LF_VERSION_MINOR << 16) | (LF_VERSION_MICRO << 8) | LF_VERSION_BUGFIX) |
| Full library version. | |
| #define | LF_MIN_DATABASE_VERSION 0 |
| Oldest database version supported by this release. | |
| #define | LF_MAX_DATABASE_VERSION 1 |
| Latest database version supported by this release. | |
| #define | LF_EXPORT |
| This macro expands to an appropiate symbol visibility declaration. | |
| #define | DEPRECATED |
| For marking deprecated functions, see http://stackoverflow.com/a/21265197. | |
| #define | cbool int |
| C-compatible bool type; don't bother to define Yet Another Boolean Type. | |
Typedefs | |
| typedef char * | lfMLstr |
| typedef unsigned char | lf_u8 |
| typedef unsigned short | lf_u16 |
| typedef unsigned int | lf_u32 |
| typedef float | lf_f32 |
| typedef double | lf_f64 |
Enumerations | |
| enum | lfError { LF_NO_ERROR = 0 , LF_WRONG_FORMAT , LF_NO_DATABASE } |
Functions | |
| void | lf_free (void *data) |
| const char * | lf_mlstr_get (const lfMLstr str) |
| Get a string corresponding to current locale from a multi-language string. | |
| lfMLstr | lf_mlstr_add (lfMLstr str, const char *lang, const char *trstr) |
| Add a new translated string to a multi-language string. | |
| lfMLstr | lf_mlstr_dup (const lfMLstr str) |
| Create a complete copy of a multi-language string. | |
These functions will help handling basic structures of the library.
| #define cbool int |
C-compatible bool type; don't bother to define Yet Another Boolean Type.
Referenced by lf_camera_check(), lf_db_load_directory(), lf_lens_check(), lf_lens_interpolate_crop(), lf_lens_interpolate_distortion(), lf_lens_interpolate_fov(), lf_lens_interpolate_real_focal(), lf_lens_interpolate_tca(), lf_lens_interpolate_vignetting(), lf_lens_remove_calib_crop(), lf_lens_remove_calib_distortion(), lf_lens_remove_calib_fov(), lf_lens_remove_calib_real_focal(), lf_lens_remove_calib_tca(), lf_lens_remove_calib_vignetting(), lf_modifier_add_color_callback_vignetting(), lf_modifier_add_coord_callback_distortion(), lf_modifier_add_coord_callback_geometry(), lf_modifier_add_coord_callback_scale(), lf_modifier_add_subpixel_callback_TCA(), lf_modifier_apply_color_modification(), lf_modifier_apply_geometry_distortion(), lf_modifier_apply_subpixel_distortion(), lf_modifier_apply_subpixel_geometry_distortion(), lf_modifier_get_auto_scale(), lf_modifier_initialize(), and lf_mount_check().
| #define DEPRECATED |
For marking deprecated functions, see http://stackoverflow.com/a/21265197.
Referenced by lfLens::AddCalibFov(), lfDatabase::Create(), lfModifier::Create(), lfDatabase::Destroy(), lfModifier::Destroy(), lfLens::InterpolateFov(), lf_lens_add_calib_fov(), lf_lens_interpolate_fov(), lf_lens_remove_calib_fov(), and lfLens::RemoveCalibFov().
| #define LF_EXPORT |
This macro expands to an appropiate symbol visibility declaration.
Referenced by lf_camera_check(), lf_camera_copy(), lf_camera_destroy(), lf_camera_new(), lf_db_destroy(), lf_db_find_cameras(), lf_db_find_cameras_ext(), lf_db_find_lenses(), lf_db_find_lenses_hd(), lf_db_find_mount(), lf_db_get_cameras(), lf_db_get_lenses(), lf_db_get_mounts(), lf_db_load(), lf_db_load_data(), lf_db_load_directory(), lf_db_load_file(), lf_db_mount_name(), lf_db_new(), lf_db_save(), lf_db_save_all(), lf_db_save_file(), lf_free(), lf_get_crop_desc(), lf_get_distortion_model_desc(), lf_get_lens_type_desc(), lf_get_tca_model_desc(), lf_get_vignetting_model_desc(), lf_lens_add_calib_crop(), lf_lens_add_calib_distortion(), lf_lens_add_calib_fov(), lf_lens_add_calib_real_focal(), lf_lens_add_calib_tca(), lf_lens_add_calib_vignetting(), lf_lens_check(), lf_lens_copy(), lf_lens_destroy(), lf_lens_guess_parameters(), lf_lens_interpolate_crop(), lf_lens_interpolate_distortion(), lf_lens_interpolate_fov(), lf_lens_interpolate_real_focal(), lf_lens_interpolate_tca(), lf_lens_interpolate_vignetting(), lf_lens_new(), lf_lens_remove_calib_crop(), lf_lens_remove_calib_distortion(), lf_lens_remove_calib_fov(), lf_lens_remove_calib_real_focal(), lf_lens_remove_calib_tca(), lf_lens_remove_calib_vignetting(), lf_mlstr_add(), lf_mlstr_dup(), lf_mlstr_get(), lf_modifier_add_color_callback(), lf_modifier_add_color_callback_vignetting(), lf_modifier_add_coord_callback(), lf_modifier_add_coord_callback_distortion(), lf_modifier_add_coord_callback_geometry(), lf_modifier_add_coord_callback_scale(), lf_modifier_add_subpixel_callback(), lf_modifier_add_subpixel_callback_TCA(), lf_modifier_apply_color_modification(), lf_modifier_apply_geometry_distortion(), lf_modifier_apply_subpixel_distortion(), lf_modifier_apply_subpixel_geometry_distortion(), lf_modifier_destroy(), lf_modifier_get_auto_scale(), lf_modifier_initialize(), lf_modifier_new(), lf_mount_check(), lf_mount_copy(), lf_mount_destroy(), and lf_mount_new().
| #define LF_VERSION_MAJOR 0 |
Major library version number.
| #define LF_VERSION_MICRO 4 |
Library micro version number.
| #define LF_VERSION_MINOR 3 |
Minor library version number.
| typedef float lf_f32 |
The type of a 32-bit floating-point pixel
| typedef double lf_f64 |
The type of a 64-bit floating-point pixel
| typedef unsigned short lf_u16 |
The type of a 16-bit pixel
| typedef unsigned int lf_u32 |
The type of a 32-bit pixel
| typedef unsigned char lf_u8 |
The type of a 8-bit pixel
| typedef char* lfMLstr |
The storage of "multi-language" strings is simple yet flexible, handy and effective. The first (default) string comes first, terminated by \0 as usual, after that a language code follows, then \0 again, then the translated value and so on. The list terminates as soon as a \0 is encountered instead of next string, e.g. last string in list is terminated with two null characters.
| enum lfError |
liblensfun error codes: negative codes are -errno, positive are here
| Enumerator | |
|---|---|
| LF_NO_ERROR | No error occured |
| LF_WRONG_FORMAT | Wrong XML data format |
| LF_NO_DATABASE | No database could be loaded |
| void lf_free | ( | void * | data | ) |
The basics of memory allocation: never free objects allocated by the library yourselves, instead use this function. It is a direct equivalent of standard C free(), however you should not use free() in the event that the library uses a separate heap.
| data | A pointer to memory to be freed. |
References LF_EXPORT, and lf_free().
Referenced by lf_free().
Add a new translated string to a multi-language string.
This uses realloc() so returned value may differ from input.
| str | The string to append to. Can be NULL. |
| lang | The language for the new added string. If NULL, the default string is replaced (the first one in list, without a language designator). |
| trstr | The translated string |
References LF_EXPORT, and lf_mlstr_add().
Referenced by lf_mlstr_add().
Create a complete copy of a multi-language string.
| str | The string to create a copy of |
References LF_EXPORT, and lf_mlstr_dup().
Referenced by lf_mlstr_dup().
| const char * lf_mlstr_get | ( | const lfMLstr | str | ) |
Get a string corresponding to current locale from a multi-language string.
Current locale is determined from LC_MESSAGES category at the time of the call, e.g. if you change LC_MESSAGES at runtime, next calls to lf_mlstr_get() will return the string for the new locale.
References LF_EXPORT, and lf_mlstr_get().
Referenced by lf_mlstr_get().