Moved to PNG and added code for mipmap generation