[PATCH 2/3] Add callbacks for format creation and resizing