Maya Python Scale Picture
How to scale a picture to fit a window/layout? With the code below the original image is not actually enlarged to 300px, it is displayed with the original image size instead. impo
Solution 1:
Try this
import maya.OpenMaya as om
def resize_image(source_image, output_image, width, height):
image = om.MImage()
image.readFromFile(source_image)
image.resize( width, height )
image.writeToFile(output_image, 'png')
resizeImage('<source_image.png>','<output_image.png>', 300, 300)
Post a Comment for "Maya Python Scale Picture"