Hi guys

I have been making a program over the last few days that grabs an image and re-paints it in paint in 256 colour. The main thing this program is for is so you can watch it getting painted in paint.

It works perfectly on my computer but i find that as soon as i take it to faster computers the whole thing goes haywire. It just stuffs up the whole image becuase the program seems to just get ahead of itself. I am finding it difficult to debug as i do not have access to a computer that is fast enough to make is stuff up and so i was wondering if anybody out there with a fast computer is willing to lend a hand and help find a way to fix it so nothing goes wrong.

Note that you will need the Win32 extensions to python installed as well as PyHook so the program can exit when you press the Q key (to do this try it while it is changing colour otherswise it sometimes wont work). You will also need Sendkeys.

Any help would be appreciated!

Ene Uran left an example of a screen image grabber in the Python snippets:
http://www.daniweb.com/code/snippet707.html

She simply used a small for loop to create a delay long enough to sort things out.

I am not trying to do that.
What i want to do is have it so you supply an image in the program and the program then draws it in paint. I really dont want to just shortcut and re-save it.

The point of the program is to see the actual image being drawn in paint. If you want just grab the source code i have attached to the previous post and have a look.

Sorry to double post and all its just i thought it might be useful to people if i posted the links to all of the modules this code needs so they could run it.

Win32 modules - python.net/crew/mhammond/win32/Downloads.html

Sendkeys - http://www.rutherfurd.net/python/sendkeys/

pyHook - http://sourceforge.net/project/showfiles.php?group_id=65529

wxPython - http://www.wxpython.org/download.php

Python Imaging Libary - http://www.pythonware.com/products/pil/

Sorry there is so many modules that people might not have.
Oh i will also attach the .py file this time in case people want to help. It is in the zip file i attach.

I ran your code and it took over my computer. It took me forever to get it back to normal again. There is something wrong with your application of sendkeys or pyhook!

To tell you the truth, I won't even try to figure it out.

Oh i'm so sorry Ene. The program uses the mouse to draw the picture. I should have said that above. Also it is best to try a small picture otherwise it will take some time to do. The amount of beeps will tell you how many minutes. Anyhow dont worry about it. I think i should do some more coding before i post it again. Thanks for trying though and sorry!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.