Hello again
I'm still wrestling with Python / Tkinter / PIL. I have almost got it
to work - on a Fedora Core 1 system I can now display images in a
Tkinter window. But I also run a Fedora Core 3 system, and when I
tried the same procedures I get the following errors:-
[kpeter@localhos t jpgTest]$ python pil_jpg.py
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__
return self.func(*args )
File "pil_jpg.py ", line 26, in do_something
a.thumbnail((20 0,150))
File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1422, in
thumbnail
self.load()
File "/usr/lib/python2.3/site-packages/PIL/ImageFile.py", line 180,
in load
d = Image._getdecod er(self.mode, d, a, self.decodercon fig)
File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 328, in
_getdecoder
raise IOError("decode r %s not available" % decoder_name)
IOError: decoder jpeg not available
I am running Python 2.3.4, PIL 1.1.5 on a Fedora Core 3 system. I know
the code is ok, as it runs quite happily under FC1 and Windows. I've
searched around for clues, and found a few references to this error
message, but quite frankly don't understand what they are saying.
Searching around for files that look as if they may be the jpeg
libraries I can find
/usr/lib/libjpeg.so.62.0 .0, and a symbolic link /usr/lib/libjpeg.so.62.
I think I somehow have to configure PIL to recognise these, but I am
not sure and anyway don't know how to do this.
Can anyone help?
Peter 9 3551
Someone out there must surely know - please!
Peter
On 2/7/06, Steve Holden <st***@holdenwe b.com> wrote: pe**********@ta lk21.com wrote: Someone out there must surely know - please!
Peter
Try building the PIL from scratch. It might give you some insight as
to which library it exactly is looking for. I can remember when
compiling the PIL on my mac having to create a symbolic link to
libjpeg.so.6 or something. It was bizarre but worked fine afterwards.
--
Andrew Gwozdziewycz <ap****@gmail.c om> http://ihadagreatview.org http://plasticandroid.org
This is because PIL, is not able to find the jpeg library .
1. Install jpeg-libs from sources: ( http://www.ijg.org/files/jpegsrc.v6b.tar.gz)
2.0: "clean" the PIL build
2.1 In setup.py that comes with PIL, set the JPEG_ROOT to the jpeg-lib path
3.0 run setup.py
I hope that should help ..
cheers,
amit
On 2/9/06, Andrew Gwozdziewycz <ap****@gmail.c om> wrote: On 2/7/06, Steve Holden <st***@holdenwe b.com> wrote: pe**********@ta lk21.com wrote: Someone out there must surely know - please!
Peter
Try building the PIL from scratch. It might give you some insight as to which library it exactly is looking for. I can remember when compiling the PIL on my mac having to create a symbolic link to libjpeg.so.6 or something. It was bizarre but worked fine afterwards.
-- Andrew Gwozdziewycz <ap****@gmail.c om> http://ihadagreatview.org http://plasticandroid.org -- http://mail.python.org/mailman/listinfo/python-list
--
----
Amit Khemka -- onyomo.com
Endless the world's turn, endless the sun's Spinning, Endless the quest;
I turn again, back to my own beginning, And here, find rest.
Thanks for that tip
Following a dialogue in that discussion group it is now working. The
problem was that I didn't have the right jpeg library installed
(although what I had was enough to show jpegs in gThumb, GIMP and the
Gnome and KDE desktops so I don't understand why it wasn't). I had to
also install a jpeg development library, which fortunately was
available on my Fedora Core 3 installation disc.
A final glitch was that the previous broken build interfered with the
linking of PIL to the libraries. I went for overkill, and deleted all
the PIL installation and site-packages directories, then reinstalled
from the original tarball. This gave a curious glitch, in that the
first time I ran it it failed to load Tkinter with some obscure error
message, but on a retry everything was fine. This worries me slightly,
as I don't know what happened and there is always a chance it could
happen again, but until it does I can't investigate it.
Slightly off topic, but I think my experience here is typical of any
installation on a Linux system, and illustrates why, despite huge
improvements over the last few years, Linux is not yet really suitable
for non expert use.
Thanks to everyone who's helped me over the last few months.
Peter pe**********@ta lk21.com wrote: .... The problem was that I didn't have the right jpeg library installed (although what I had was enough to show jpegs in gThumb, GIMP and the Gnome and KDE desktops so I don't understand why it wasn't). I had to also install a jpeg development library, which fortunately was available on my Fedora Core 3 installation disc....
The problem is in the name chosen by _lots_ of distributions. A "jpeg
developer library" or any other of the "developmen t libraries" are not
just for those who intend to "develop" jpeg, but really for those who
"develop programs" -- that is run compilers and linkers. If you need
to compile and link a program that uses one of these libraries, you need
the "developer library." Even if the only sense in which you are a
developer is that you are rebuilding Fredrik's code.
--Scott David Daniels sc***********@a cm.org
Peter,
Can you share the name of the library on the Fedora distro?
thx,
gerry rodman http://www.gerryrodman.com/ pe**********@ta lk21.com wrote: Thanks for that tip
Following a dialogue in that discussion group it is now working. The problem was that I didn't have the right jpeg library installed (although what I had was enough to show jpegs in gThumb, GIMP and the Gnome and KDE desktops so I don't understand why it wasn't). I had to also install a jpeg development library, which fortunately was available on my Fedora Core 3 installation disc.
A final glitch was that the previous broken build interfered with the linking of PIL to the libraries. I went for overkill, and deleted all the PIL installation and site-packages directories, then reinstalled from the original tarball. This gave a curious glitch, in that the first time I ran it it failed to load Tkinter with some obscure error message, but on a retry everything was fine. This worries me slightly, as I don't know what happened and there is always a chance it could happen again, but until it does I can't investigate it.
Slightly off topic, but I think my experience here is typical of any installation on a Linux system, and illustrates why, despite huge improvements over the last few years, Linux is not yet really suitable for non expert use.
Thanks to everyone who's helped me over the last few months.
Peter
Found it...and will share.
You need to install the "X Software Developement" library (standard
only is enough) from you Fedora distro...not sure what will be required
on other Linux distro's.
Worked like a charm...thanks Peter.
gerry rodman http://www.gerryrodman.com/
> Can you share the name of the library on the Fedora distro?
file:///media/cdrecorder/Fedora/RPMS/libjpeg-devel-6b-33.i386.rpm
On disc 3 in my copy, but that probably doesn't mean anything!
Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Derek |
last post by:
I wanted to know if anyone had any insight or sample code of creating
an AVI file from a directory of JPEG images. I have read the thread
that that speaks about creating a MOV file from JPEG images but I need
to create a AVI file. I also am aware of the sample code provided by
sun in the following link that shows how to create a MOV file from
JPEG images (http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.html).
...
|
by: frankenberry |
last post by:
I have multi-page tiff files. I need to extract individual frames from the
multi-page tiffs and save them as single-page tiffs. 95% of the time I
receive multi-page tiffs containing 1 or more black and white CCITT4
compressed files (frames) inside the tiff. Every now and then I receive a
mixture of black and white CCITT4 and JPEG compressed files, and sometimes
just multi-page tiffs with JPEG only. The code runs great when dealing with
the...
|
by: markus |
last post by:
I have an application that I think was developed using some form of
Borland C with a folder for BIG images with the extension .fre. When I
try to view them they cannot be read even by changing the extension
to jpg, bmp, zip, etc.
I also used some utilities for resource extraction with no success.
I know the images are there and there has to be a way to show and
convert them to a known format. I have seen libjpeg.dll and zlib.dll
in...
|
by: Rednelle |
last post by:
Greetings all,
As a newbie, using Access 2000, I would appreciate advice on the best
way to include pictures.
I have developed a 'Home Inventory' database which can include jpeg
thumbnails of my items and I can review things at anytime - on the desktop
where I created all this - no problem so far.
I networked the mdb file (only) across to my laptop and found the
pictures don't show. So I guess my database table is only storing links to
|
by: jordi_ramis |
last post by:
Hi,
I'm currently using image.fromfile to load jpg images in my
application. I've noted that this procedure is very slow compared to
some aplications I have seen. Is there any way to load a jpeg image
into an image or bitmap object faster that image.fromfile?. Prefereably
one method or component that is free.
Thanks a lot for your help.
| |
by: Michael martin |
last post by:
I'm trying to create a picture database for a site that I'm working on and I
would like to do the following:
- (main goal) Have a php script load an entire directory of photos into my
mysql database in one swoop.
- Display thumbnails on a general viewing page.
- allow for viewing individual pictures by clicking on the thumbnails.
<?php
error_reporting(E_ALL);
$id = $_REQUEST;
|
by: den 2005 |
last post by:
Hi everyone,
Here is code working on..Trying to insert record with a column with Image
or VarBinary datatype in sql database from a existing jpeg image file, then
retrieve this image from database and display it in a Image web control
dynamically(at runtime).
The process after being displayed in the web control, user click insert/add
button, it converts the image(jpeg) file to bytes and store it the database
with Image or VarBinary...
|
by: Aquosus |
last post by:
I would like to know how to load images from a file using JavaScript.
path = = root/images/kitchens/web
all files are jpeg
I would like to be able to loop through the file and capture all the file
names then concat the path name infront of the file into an array.
Could someone show me what I need to know please?
|
by: Masood |
last post by:
Greetings,
We are writing an application wherein we have to display jpeg images,
we are thinking of using the IJG JPEG LIB written in C code. Will be
greatfull if someone could guide us as to how we can invoke or use the
IJG LIB through C#.
Thanks in Advance
MasooD
|
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...
|
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...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |