Mac OS X and jpeg support....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry

    Mac OS X and jpeg support....

    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
  • Christopher Barker

    #2
    Re: Mac OS X and jpeg support....



    Jerry wrote:
    [color=blue]
    > 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...)[/color]
    [color=blue]
    > How can I get jpeg support going?[/color]

    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

    Chris.Barker@no aa.gov

    Comment

    • Roberto Lopez-Gulliver

      #3
      Re: Mac OS X and jpeg support....

      > There is another Package Manger Repository put together by Bob Ippolito,[color=blue]
      > 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.[/color]

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




      hope this helps ... and have fun!

      --r

      Comment

      Working...