factoring wx.Image

A

Astan Chee

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top