Exprimental feature auto lens distortion correction, on behalf of Guokai; see issue #576

This commit is contained in:
Oliver Duis
2011-03-12 18:45:44 +01:00
parent aded66851e
commit 751dbfd408
38 changed files with 5463 additions and 7 deletions

View File

@@ -44,6 +44,7 @@ inline int feof (IMFILE* f) {
}
inline void fseek (IMFILE* f, int p, int how) {
int fpos = f->pos;
if (how==SEEK_SET)
f->pos = p;
@@ -51,6 +52,9 @@ inline void fseek (IMFILE* f, int p, int how) {
f->pos += p;
else if (how==SEEK_END)
f->pos = f->size-p;
if (f->pos < 0 || f->pos> f->size)
f->pos = fpos;
}
inline int fgetc (IMFILE* f) {