473,748 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with JPEG support with PIL 1.1.5 and OSX

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.

Here is info on my system (note this is not the default Python version
that comes with OSX):
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin

This email is really long, I've seperated the sections with 3-4 lines
of spacing.

Here is my own PIL installation summary, I followed directions in
README. I am using the most recent install package from the PIL
website. I also tried using the default JPEG_ROOT=None and JPEG_ROOT
= "sw/lib", where I was able to locate the jpeglib files.
---------------------------------------------------------------------------------------
running install
running build
running build_py
running build_ext
--------------------------------------------------------------------
PIL 1.1.5 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.5
platform darwin 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
*** FREETYPE2 support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.
running build_scripts
running install_lib
running install_scripts
changing mode of
/Library/Frameworks/Python.framewor k/Versions/2.4/bin/pilconvert.py to
755
changing mode of
/Library/Frameworks/Python.framewor k/Versions/2.4/bin/pildriver.py to
755
changing mode of
/Library/Frameworks/Python.framewor k/Versions/2.4/bin/pilfile.py to 755
changing mode of
/Library/Frameworks/Python.framewor k/Versions/2.4/bin/pilfont.py to 755
changing mode of
/Library/Frameworks/Python.framewor k/Versions/2.4/bin/pilprint.py to
755
creating
/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-packag
es/PIL.pth
---------------------------------------------------------------------------------------
This file was 212KB.

I tried running the self-test and this is my output:
*************** *************** *************** *************** *****
Failure in example: _info(Image.ope n("Images/lena.jpg"))
from line #24 of selftest.testim age
Exception raised:
Traceback (most recent call last):
File "./doctest.py", line 499, in _run_examples_i nner
exec compile(source, "<string>", "single") in globs
File "<string>", line 1, in ?
File "./selftest.py", line 21, in _info
im.load()
File "PIL/ImageFile.py", line 180, in load
d = Image._getdecod er(self.mode, d, a, self.decodercon fig)
File "PIL/Image.py", line 328, in _getdecoder
raise IOError("decode r %s not available" % decoder_name)
IOError: decoder jpeg not available
1 items had failures:
1 of 55 in selftest.testim age
***Test Failed*** 1 failures.
*** 1 tests of 55 failed.



I ran "$python -vv -c "import _imaging"" and this was the important output:
------------------------------------------------------------------------
import _imaging # dynamically loaded from
/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-packages/PIL/_imaging.so
------------------------------------------------------------------------
This file was 962KB.

The _imaging.so file mentioned above (962KB) was not actually the same
one that I compiled earlier (212KB). So I figured there must be some
problem with my python path. I copied the newly compiled version into
the python PIL directory above and tried again. Same problem on self
test.


I then tried the Darwin ports py-pil (http://py-pil.darwinports.com/).
This is the output that I got when installing:
------------------------------------------------------------------------
sudo port install py-pil
--- Fetching freetype
--- Attempting to fetch freetype-2.1.10.tar.bz2 from
http://download.savannah.gnu.org/releases/freetype/
--- Verifying checksum(s) for freetype
--- Extracting freetype
--- Applying patches to freetype
--- Configuring freetype
--- Building freetype with target all
--- Staging freetype into destroot
--- Packaging tgz archive for freetype 2.1.10_1
--- Installing freetype 2.1.10_1
--- Activating freetype 2.1.10_1
--- Cleaning freetype
--- Fetching jpeg
--- Attempting to fetch jpegsrc.v6b.tar .gz from http://www.ijg.org/files
--- Verifying checksum(s) for jpeg
--- Extracting jpeg
--- Applying patches to jpeg
--- Configuring jpeg
--- Building jpeg with target all
--- Staging jpeg into destroot
--- Packaging tgz archive for jpeg 6b_1
--- Installing jpeg 6b_1
--- Activating jpeg 6b_1
--- Cleaning jpeg
--- Fetching py-pil
--- Attempting to fetch Imaging-1.1.5.tar.gz from http://effbot.org/downloads/
--- Verifying checksum(s) for py-pil
--- Extracting py-pil
--- Applying patches to py-pil
--- Configuring py-pil
--- Building py-pil with target build
--- Staging py-pil into destroot
--- Packaging tgz archive for py-pil 1.1.5_1
--- Installing py-pil 1.1.5_1
--- Activating py-pil 1.1.5_1
--- Cleaning py-pil
------------------------------------------------------------------------
This created a _imaging.so file which was 684KB.

I copied this newly created _imaging.so file into my appropriate
python PIL directory and ran self-test again, and it still had the
same error.

Another test I did was to remove _imaging.so completely from the PIL
directory in Python. When I ran (python -vv -c "import _imaging"),
this was the output:
------------------------------------------------------------------------
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named _imaging
------------------------------------------------------------------------
But self_test.py still had the same output as before (JPEG decode error).


I also downloaded jpeglib(jpeg-6b) and built it myself (succesfully),
and passed the lib directory for JPEG_ROOT in the PIL installer, but
that didn't have any different self-test results.

It is also very strange that i can set the JPEG_ROOT to be anything,
even something ficticious and the installer will report 'no support
errors' for JPEG.


Another strange thing is a discprency in JPEG libraries, py-pil seems
to use JPEG while PIL seems to reference only LIBJPEG.


Running a search on my HD for _imaging.so turns up 4 sources:
1) /opt/local/lib/python2.4/site-package/PIL/_imaging.so (684KB - this
was generated by the py-pil install)
2) /opt/local/var/db/dports/software/py-pil/1.1.5_1/opt/lcoal/lib/python2.4/site-packages/PIL/_imagin.so
(684KB - this was generated by the py-pil install)
3) Desktop/Imaging-1.1.5/PIL/_imaging.so (212KB - this was generated
by the PIL Imaging isntall)
4) Desktop/Imaging-1.1.5/build/lib.darwin-7.9.0-Power_macintosh-2.4/_imaging.so
(212KB - this was generated by the PIL Imaging install)

My goal is to get the self-test working properly. Somebody please help!
--
Jack Wu
Sep 22 '06 #1
0 2222

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

Similar topics

0
3554
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
5082
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.
2
2319
by: Jerry | last post by:
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
3
3900
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",...
1
1526
by: scorpion53061 | last post by:
I really like this javascript for an image slideshow. The only thing I woudl like to do differently is have a cell above the image and navigation that would allow text content to be placed. Does anyone have an idea of how that might be acomplished? Header.... <SCRIPT LANGUAGE="JavaScript"> <!-- Begin
2
1516
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:
11
26627
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
1
2440
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?
11
5379
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
8987
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
8826
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
9366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9241
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
8239
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...
0
6073
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();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.