Re: Is it possible to change a picture resolution with Python?

2006-09-22 Thread Tim Roberts
Lad [EMAIL PROTECTED] wrote: Tim , Thank you for the explanation, And I must also thank you all you others, who helped me. Particularly, bearophile and Max. Now I use the following code , that provided bearophile, from PIL import Image im = Image.open(output3.jpg) nx, ny = im.size im2 =

Re: Is it possible to change a picture resolution with Python?

2006-09-21 Thread Tim Roberts
Lad [EMAIL PROTECTED] wrote: from image: http://www.pythonware.com/library/pil/handbook/image.htm This is some example code: from PIL import Image im = Image.open(1.jpg) nx, ny = im.size im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC) im2.save(2.png) Bye, bearophile, Thank

Re: Is it possible to change a picture resolution with Python?

2006-09-21 Thread Lad
Tim Roberts wrote: Lad [EMAIL PROTECTED] wrote: from image: http://www.pythonware.com/library/pil/handbook/image.htm This is some example code: from PIL import Image im = Image.open(1.jpg) nx, ny = im.size im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC)

Is it possible to change a picture resolution with Python?

2006-09-20 Thread Lad
Is it possible to change a picture resolution with Python? Let's say I have a picture with a resolution of 96 dpi and I would like to increase to 256dpi or higher. Thank you for your reply. LL -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to change a picture resolution with Python?

2006-09-20 Thread bearophileHUGS
Lad: Is it possible to change a picture resolution with Python? Let's say I have a picture with a resolution of 96 dpi and I would like to increase to 256dpi or higher. Resolution is a too much overloaded word, from some point of view increasing the resolution of images is a very difficult

Re: Is it possible to change a picture resolution with Python?

2006-09-20 Thread Lad
from image: http://www.pythonware.com/library/pil/handbook/image.htm This is some example code: from PIL import Image im = Image.open(1.jpg) nx, ny = im.size im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC) im2.save(2.png) Bye, bearophile, Thank you for your reply. But the

Re: Is it possible to change a picture resolution with Python?

2006-09-20 Thread bearophileHUGS
Lad: But the above code increases size only , but not DPI resolutions( vertical nad horizontal).I need a higher vertical and horisontal resolutions. Any idea how to do that? Do you need to overwrite the DPI tag contained in the header of a Jpeg/PNG image? Then you can probably find some

Re: Is it possible to change a picture resolution with Python?

2006-09-20 Thread Diez B. Roggisch
Thank you for your reply. But the above code increases size only , but not DPI resolutions( vertical nad horizontal).I need a higher vertical and horisontal resolutions. Any idea how to do that? The DPI is nothing an image contains by itself - it depends on the resolution of the rendering

Re: Is it possible to change a picture resolution with Python?

2006-09-20 Thread Max Erickson
Lad [EMAIL PROTECTED] wrote: from image: http://www.pythonware.com/library/pil/handbook/image.htm This is some example code: from PIL import Image im = Image.open(1.jpg) nx, ny = im.size im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC) im2.save(2.png) Bye, bearophile,