Posted by: Cuv
« on: April 04, 2013, 11:51:40 AM »Very nice, that will be useful!!
def resizeFrame (self, percent, PILPalette,
width, height, data, centerX, centerY):
im = Image.fromstring("P", (width, height), data)
im.putpalette(PILPalette)
if width > 1 and height > 1:
width = width * percent / 100
height = height * percent / 100
im2 = im.resize ((width, height))
data = im2.tostring()
centerX = centerX * percent / 100
centerY = centerY * percent / 100
return width, height, data, centerX, centerY