openfimg: Work in progress (2013.12.06)

- initial import of geometry conversion code,
- minor code consolidation.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>