faqts : Computers : Programming : Languages : Python : Common Problems : Images

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 13 people (85%) answered Yes
Recently 5 of 7 people (71%) answered Yes

Entry

How can one resize and or rotate jpegs?

Feb 21st, 2001 04:24
Mixo Shiburi,


If you have Python, get a the Python(ware) Image Library(PIL). After 
installing is you should be able to manipulate images (jpg,ppm,etc).
For example, to rotate type in
              import  Image
              im= Image.open("youfilehere")  #open a the file
              im2=im.rotate(45) #where 45 is a an angle
              im2.show() #shows the image
              im2.save("filename")  #saves the image
You can get PIL  from http://www.pythonware.com