fixed jumping bug
added metadata reader to genimg.py