473,395 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Python Image Manipulation

Can anyone recommend the easiest way of generating thumbnail images using a
Python library? I've seen that the Python Image Library (PIL) seems to do
this but it isn't installed on my available systems. I'd prefer to use
something distributed with Python, if possible, but will install the library
that makes this functionality easy as a second choice.

Thanks!
Scott

--
Remove .nospam from my e-mail address to mail me.

http://www.e-scott.net
Jul 18 '05 #1
2 4524
Scott Brady Drummonds wrote:
Can anyone recommend the easiest way of generating thumbnail images using a
Python library? I've seen that the Python Image Library (PIL) seems to do
this but it isn't installed on my available systems. I'd prefer to use
something distributed with Python, if possible, but will install the library
that makes this functionality easy as a second choice.


i'm not aware of python built-in functions to resize images,
but with PIL is dead easy to make thumbnails, check:

from "Python is Kung-Fu for the Web":
<http://blog.mans.de/archives/2004/03/28/python-is-kung-fu-for-the-web/>

import Image
im = Image.open(filename)
im.thumbnail((200, 200), Image.ANTIALIAS)
im.save(thumbnail, "JPEG", quality = 80, optimize = 1)

you can also feed to open() a file(-like) object, instead
of a filename.

HTH,
deelan.
Jul 18 '05 #2
"Scott Brady Drummonds" <sc**********************@intel.com> wrote in message news:<cg**********@news01.intel.com>...
Can anyone recommend the easiest way of generating thumbnail images using a
Python library? I've seen that the Python Image Library (PIL) seems to do
this but it isn't installed on my available systems. I'd prefer to use
something distributed with Python, if possible, but will install the library
that makes this functionality easy as a second choice.

Thanks!
Scott


The easiest way is using PIL. There is sample code in the PIL
documentation that you can use directly.
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rune Johansen | last post by:
Hi. I'm doing some image manipulation in an applet using the example code on this page: http://www.akop.org/art/pixels3.htm However, I really want an application rather than an applet, I just...
1
by: Kenneth McDonald | last post by:
Warning: this post may display my utter ignorance of image file format facts. As part of a photo album program I'm working on, I'd like to be able to work with the metadata in JPEG files, which...
0
by: Stewart Midwinter | last post by:
I would like to do some image / map manipulation with Python. I've got a very large map file in .png format. My thought is to chop it up into small tiles using some method. What Python module...
9
by: Job | last post by:
Hi, I would like to find out what ASP/ASP.net can do with image manipulation. Does ASP have built in functions (eg. after upload to server) to manipulate images, like rotate, scale, crop etc.?...
3
by: David | last post by:
I would like to display a JPEG image from Python on a Windows machine. I Googled 'python jpeg display' and have not found what I am looking for, which is code I can call directly and pass the...
9
by: zacariaz | last post by:
I dont know, and i dont much like javascript, however, i am told that the only way to do want i want to do, is with javascript, so here goes. zoom and cut is the only features i need. 1. the...
14
by: nicolasg | last post by:
Hi folks, I have accomplished to make a python program that make some image manipulation to bmp files. I now want to provide this program as a web service. A user can visit a site and through a...
42
by: John Doty | last post by:
I realized that I have a little job on the table that is a fine test of the Python versus Standard Forth code availability and reusability issue. Note that I have little experience with either...
8
by: shotokan99 | last post by:
i have this situation. i have a query string: http://www.myquerystring.com?x=xxxxx what this url does is it will return or start downloading a .png file. what i wanted to do is trap this png...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.