summaryrefslogtreecommitdiffstats
path: root/src/lensfun-test.c
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-10-22 02:34:01 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-10-22 02:34:27 (GMT)
commit94d534524a36bf1af920ac574b6c77402ac33e88 (patch)
treed68aed9977c5e7f057dac7773f29ecd33adf1f17 /src/lensfun-test.c
parent168f00c0d173cd1a9605262d6e1470d2313a6120 (diff)
downloadmxe-94d534524a36bf1af920ac574b6c77402ac33e88.zip
mxe-94d534524a36bf1af920ac574b6c77402ac33e88.tar.gz
mxe-94d534524a36bf1af920ac574b6c77402ac33e88.tar.bz2
lensfun: Update
Fixes #542. Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/lensfun-test.c')
-rw-r--r--src/lensfun-test.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lensfun-test.c b/src/lensfun-test.c
index 46c284f..f00a13f 100644
--- a/src/lensfun-test.c
+++ b/src/lensfun-test.c
@@ -4,18 +4,24 @@
*/
/*
+ * Modifications from the original example:
+ * - Do not use negative reserved return codes in main()
+ * - Sort headers and use <> instead of "" for lensfun.h
+ */
+
+/*
http://lensfun.sourceforge.net/manual/example_8c-example.html
A simple example of library usage from plain C
*/
-#include <lensfun.h>
#include <stdio.h>
#include <locale.h>
+
#include <glib.h>
+#include <lensfun.h>
int main ()
-{
- int i, j;
+{ int i, j;
const struct lfMount *const *mounts;
const struct lfCamera *const *cameras;
const struct lfLens *const *lenses;
@@ -68,10 +74,10 @@ int main ()
lf_mlstr_get (lenses [i]->Maker),
lf_mlstr_get (lenses [i]->Model));
g_print ("\tCrop factor: %g\n", lenses [i]->CropFactor);
+ g_print ("\tAspect ratio: %g\n", lenses [i]->AspectRatio);
g_print ("\tFocal: %g-%g\n", lenses [i]->MinFocal, lenses [i]->MaxFocal);
g_print ("\tAperture: %g-%g\n", lenses [i]->MinAperture, lenses [i]->MaxAperture);
g_print ("\tCenter: %g,%g\n", lenses [i]->CenterX, lenses [i]->CenterY);
- g_print ("\tCCI: %g/%g/%g\n", lenses [i]->RedCCI, lenses [i]->GreenCCI, lenses [i]->BlueCCI);
if (lenses [i]->Mounts)
for (j = 0; lenses [i]->Mounts [j]; j++)
g_print ("\tMount: %s\n", lf_db_mount_name (ldb, lenses [i]->Mounts [j]));