473,658 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 18 '05 #1
2 2316


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**********@no aa.gov
Jul 18 '05 #2
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3552
by: Pilu | last post by:
Hi....I have a problem: I installed apache 1.3 on fedora core 3... I also installed jpeg-6b, gd-2.0.28, and I configured php5 with gd and jpeg support --with-gd=/usr/local/gd2/ --with-jpeg-dir=/usr/local/lib The gonfiguration hasn't errors: checking for gdImageCreateFromJpeg in -lgd... (cached) yes
7
5080
by: google12 | last post by:
hi, May anyone help me? I need a lib which support .jpeg file with RGBA mode. PIL seems to support RGB and CMYK mode only... Thanks for your help.
3
3895
by: Steve Holden | last post by:
If nobody has a quick answer I'll go to the PIL list, but I'm having problems with PIL JPEG support on Windows, and figured someone on c.l.py might have solved this problem. I built the Cygwin PIL from source, and that works a treat. Unfortunately the Windows version (1.1.4 and 1.1.5b1) loaded using binary installers is giving File "/c/steve/website/hpgraphics.py", line 23, in ? File "C:\Python23\Lib\site-packages\PIL\ImageFont.py",...
2
1515
by: B Squared | last post by:
I recently installed PHP 5.0.4 on my Fedora system. I compiled in the GD option. (--with-gd). Then I tested the ImageTypes() function. It seems .png and .gif (IMG_PNG and IMG_GIF) are supported, but jpeg (IMG_JPEG) is not. Is this expected? How do I get .jpeg support? -- segway -- Out of curiousity, I checked the php-config file in my ../php/bin dir and here is the libs that are listed:
16
11851
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation. I can do this individually for each graph but this does not help me as I need both on the same JPEG. I thought I would try an export the form that contains both but I am having trouble. (My VBA is self taught and a little knowledge is...
0
2216
by: Jack Wu | last post by:
Hi I've spent a good majority of my day trying to figure out how to have PIL 1.1.5 working on my OSX 10.3.9_PPC machine. I'm still stuck and I have not gotten anywhere. Could somebody please help me... I've scoured all the documentation, google, and mailing lists to no avail. I believe the problem may lay in a jpeglib problem with OSX 10.3.9, or a python paths problem.
1
2430
by: alcool | last post by:
Hi, I would like use a socket for write a file jpeg on the network. In others words, it is possible to publish a jpeg (like a streamer) that a client can fetch and view? file JPEG -socket that publish this file on the network -client (browser) fetch this file and show I.E. I think that firefox show a file jpeg also if this change continually. It's true?
3
2608
by: darkblueB | last post by:
I got the Python Imaging Library from source, built and installed, on Ubuntu 7.10, not realizing I could run a self-test first. libjpeg is on the machine, but was not detected.. so no JPG encoder. I got the dev-libjpg and rebuilt PIL. The self-test now shows JPG support. but running setup.py install again seems to succeed, but still no JPG :-( fix ideas appreciated
11
5367
by: Mark B | last post by:
I want to display a pre-designed graphical 'performance badge' on certain webpages (round, about 2cm diameter) next to a salesperson's details. I have a function, fGetPerformanceGrade(SalesPersonID as Long) as String to retrieve that salesperson's grade (e.g. A+, A, A-, B+, B... D). Also one other function, fGetMonthlySales(SalesPersonID as Long) as String to get their sales figure, e.g. "$87K". I want web visitors to be able to click...
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8330
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8626
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.