factoring wx.Image

Astan Chee astan.chee at al.com.au
Thu Feb 26 21:06:47 EST 2009


Hi,
I want to factor (red, green and blue at the same time) an image using 
wx but without any GUI display or windows but it keeps crashing and if I 
set the checks to ignore it, it doesn't produce the images at all.
It looks like this:

import wx
img = wx.Image("star.jpg",wx.BITMAP_TYPE_BMP)
factor = 1
for i in range(1,30):
    image = img.AdjustChannels(factor, factor, factor, 1)
    fname = "star." + str(factor) + ".jpg"
    img.SaveFile(fname,wx.BITMAP_TYPE_JPEG)
    factor+=1

What am I missing here? What am I doing wrong? Can this even be done 
with only wx?
Thanks for any help.
Cheers
Astan




More information about the Python-list mailing list