Refactoring format to im_format to avoid collision with other extensions