Re: Image.draft -- what are the modes that I can use?
Gabriel Genellina wrote: A VNC server is about 400K in size... Yea, VNC is not an option in my case. thanks anyway, perhaps I'll look into generating a slideshow using HTML/javascript which can load the images. -- http://mail.python.org/mailman/listinfo/python-list
PIL: Image.draft -- what are the modes that I can use?
I have PIL 1.1.5 on python 2.4.1 and I am attempting to get a smaller (file size) of an image. for example: im = ImageGrab.grab() im.save(tmp.gif) about 1.7mb im.save(tmp.jpeg) about 290kb anyways I want to save the image as a GIF, but not have it be so largeso I thought that the Image.draft method would be what I wanted im.draft(mode, size) Configures the image file loader so it returns a version of the image that as closely as possible matches the given mode and size. For example, you can use this method to convert a colour JPEG to greyscale while loading it, or to extract a 128x192 version from a PCD file. .what 'modes' can I use? or is there another way to shrink the size of the image (other than resizing it)? thanks -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
abcd wrote: I have PIL 1.1.5 on python 2.4.1 and I am attempting to get a smaller (file size) of an image. for example: im = ImageGrab.grab() im.save(tmp.gif) about 1.7mb im.save(tmp.jpeg) about 290kb anyways I want to save the image as a GIF, but not have it be so largeso I thought that the Image.draft method would be what I wanted GIF is horribly unsuitable for screenshots on modern machines. have you considered using PNG ? or even better, Flash? here's a tool that lets you use VNC to capture the screen, and then convert the result to a flash animation: http://www.unixuser.org/~euske/vnc2swf/ im.draft(mode, size) Configures the image file loader so it returns a version of the image that as closely as possible matches the given mode and size. For example, you can use this method to convert a colour JPEG to greyscale while loading it, or to extract a 128x192 version from a PCD file. note the use of the words loader and loading. draft is used to speed things up when loading images, not compress things when storing them. /F -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
Fredrik Lundh wrote: GIF is horribly unsuitable for screenshots on modern machines. have you considered using PNG ? or even better, Flash? well I am trying to take screenshots and make them into an animated GIF, however, putting them into a Flash movie would be coolany idea how to go about doing either with python? (windows, possibly linux later) -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
abcd wrote: or even better, Flash? well I am trying to take screenshots and make them into an animated GIF, however, putting them into a Flash movie would be coolany idea how to go about doing either with python? (windows, possibly linux later) to repeat myself: here's a tool that lets you use VNC to capture the screen, and then convert the result to a flash animation: http://www.unixuser.org/~euske/vnc2swf/ /F -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
oh and vnc2swf would not be an option, i cant be setting up a vnc server, etc. just need to use python (and necessary packages). animated gif would probably be best i am assuming. -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
Fredrik Lundh wrote: to repeat myself: here's a tool that lets you use VNC to capture the screen, and then convert the result to a flash animation: http://www.unixuser.org/~euske/vnc2swf/ /F is there a way to make animated GIFs with python? vnc2swf is to much for what i was hoping. i have no problem with installing python packages, but having to use VNC is a bit much. thanks. -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
fredrik, in other posts you have mentioned the use of gifmaker. i have tried that with the following: I am using gifmaker.py from PIL v1.1.5 on python 2.4.1. CODE import ImageGrab, gifmaker seq = [] while keepOnGoing: im = ImageGrab.grab() seq.append(im) fp = open(out.gif, wb) gifmaker.makedelta(fp, seq) fp.close() --- however I am getting this error: Exception in thread Thread-3: Traceback (most recent call last): File c:\Python24\lib\threading.py, line 442, in __bootstrap self.run() File c:\foo.py, line 10, in run gifmaker.makedelta(fp, seq) File c:\gifmaker.py, line 79, in makedelta for s in getheader(im) + getdata(im): File c:\Python24\Lib\site-packages\PIL\GifImagePlugin.py, line 383, in getdata ImageFile._save(im, fp, [(gif, (0,0)+im.size, 0, RAWMODE[im.mode])]) KeyError: 'RGB' Any ideas? Basically I want to make an animated GIF out of a bunch of images taken using the ImageGrab module. -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
abcd wrote: ... Are you sure you can't use VNC? An animated GIF based on full-screen grabs will be amazingly huge and have very low color quality at the same time. Installing VNC on Windows should take you about 30 seconds, honest. Or is this for some sort of project where you can't use anything but CPython software...? Brett Hoerner -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
Brett Hoerner wrote: Are you sure you can't use VNC? An animated GIF based on full-screen grabs will be amazingly huge and have very low color quality at the same time. Installing VNC on Windows should take you about 30 seconds, honest. Or is this for some sort of project where you can't use anything but CPython software...? Brett Hoerner the latter. -- http://mail.python.org/mailman/listinfo/python-list
Re: Image.draft -- what are the modes that I can use?
At Wednesday 18/10/2006 11:26, abcd wrote: is there a way to make animated GIFs with python? vnc2swf is to much for what i was hoping. i have no problem with installing python packages, but having to use VNC is a bit much. A VNC server is about 400K in size... -- Gabriel Genellina Softlab SRL __ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas -- http://mail.python.org/mailman/listinfo/python-list