$obj->method("foo", "bar") gets translated (more or less) to
SomePkg::method($obj, "foo", "bar") -- the object is passed into
method as
$_[0]. Your code for
makeImage should expect the object as the first argument if you plan to use it as a method.
If the function works as you desire right now, you probably don't need it to be OO, as it doesn't get passed the object anyway.