Separated CGImage generation into a class method that can be used externally