By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,715 Members | 758 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,715 IT Pros & Developers. It's quick & easy.

Mac OS X and jpeg support....

P: n/a
Hi,
I am (today!) starting to Python...

I am runnin MacOS X 10.3.3 with:

1) "Batteries included" Aqua Tcl/Tk version 8.4.5
2) The 2.3 version of Python that comes with the OS
3) The "Panther Additions for MacOS X" package

I have used the package manager to install Tkinter. I ran a couple of
examples and Tkinter seems to work.

I tried installing via the package manage the PIL package and trying
to do anything with jpegs fails....I noticed that I did not have libjpeg
installed. I got the jpg-6b package and created libjpeg.dylib in /usr/local/lib.

I tore out the PIL stuff from /Library and reinstalled the PIL package via
the package manager....I still get failures when trying to display a jpeg
file ( format not recognized...)

Here is a simple program I am trying to use...

#!/usr/bin/python

from Tkinter import *
import Image
import sys

def main():
filename = sys.argv[1]
root = Tk()
img = PhotoImage(file=filename)
label = Label(root, image=img)
label.pack()
root.mainloop()

main()

The program will do gifs ok...

How can I get jpeg support going?

Jerry
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Jerry wrote:
I tried installing via the package manage the PIL package and trying
to do anything with jpegs fails....I noticed that I did not have libjpeg
installed. I got the jpg-6b package and created libjpeg.dylib in /usr/local/lib.

I tore out the PIL stuff from /Library and reinstalled the PIL package via
the package manager....I still get failures when trying to display a jpeg
file ( format not recognized...) How can I get jpeg support going?


There is another Package Manger Repository put together by Bob Ippolito,
and I think it includes a PIL with jpeg support built in. Check out the
archives of the Python-Mac mailing list. You should be abel to find it
at www.python.org. If you don't find what you need in the archives, join
the mailing list and post a question there.

-Chris
--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Ch**********@noaa.gov
Jul 18 '05 #2

P: n/a
> There is another Package Manger Repository put together by Bob Ippolito,
and I think it includes a PIL with jpeg support built in. Check out the
archives of the Python-Mac mailing list. You should be abel to find it
at www.python.org.


I got my python running on MacOS X following the instructions in the
VisionEgg project (which in turns points you Bob Ippolito's
repository)

http://www.visionegg.org/install-macosx-details.html
http://undefined.org/python/pimp/dar...acintosh.plist

hope this helps ... and have fun!

--r
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.