473,763 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

jpeg support in 5.0.4, (and libs)


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:

libs="-lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl
-lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz
-lm -lcrypt "

-lz is listed 6 times, -lcrypt 4 times, -lm 3 times, etc.

Is this really how it should be? I'm guessing listing the libs so many
times doesn't do any harm, but what's the point?

B Squared

-----------------------------------------------------------------------
By and large gentlemen believe in God because, by and large, they are
confident that God believes in them.
-- Douglas Sutherland, The English Gentleman
Oct 18 '05 #1
2 1517
On Tue, 18 Oct 2005 14:27:39 -0700, B Squared <nu**@null.co m> wrote:
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?
You may have to specifically use --with-jpeg-dir in configure - I've got
"--with-jpeg-dir=/usr" in the configure line I used for building PHP, which
implies at some point I added it on because JPEG support wasn't working.
-- segway --

Out of curiousity, I checked the php-config file in my ../php/bin dir
and here is the libs that are listed:

libs="-lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl
-lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz
-lm -lcrypt "

-lz is listed 6 times, -lcrypt 4 times, -lm 3 times, etc.

Is this really how it should be? I'm guessing listing the libs so many
times doesn't do any harm, but what's the point?


It's probably just output automatically by the build system, with each
extension adding on all the libraries they depend on, and more than one
requires libz, libcrypto, etc. Presumably the build system doesn't bother
eliminating duplicates, because the linker will anyway.
--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Oct 18 '05 #2
Andy Hassall wrote:
On Tue, 18 Oct 2005 14:27:39 -0700, B Squared <nu**@null.co m> wrote:

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?

You may have to specifically use --with-jpeg-dir in configure - I've got
"--with-jpeg-dir=/usr" in the configure line I used for building PHP, which
implies at some point I added it on because JPEG support wasn't working.


So I did as you suggested, the jpeg lib was in /usr/lib. I looked at the
configuration output and saw, among other stuff

checking for the location of libjpeg... /usr/lib

checking for jpeg_read_heade r in -ljpeg... yes

and there were no errors, so it looks like it worked. But the
ImageTypes() function still doesn't recognize IMG_JPEG. Any other
suggestions.

Thanks in advance.

B Squared
Oct 19 '05 #3

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

Similar topics

0
3555
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
5083
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
3903
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",...
4
2144
by: uli | last post by:
Hi all! I'm searching for a (small) free library for handling JPEG's. Especially I want to load one JPG figure and just rotate it. I have seen the 'Independent JPEG Group' in the Web, but their lib seemed a little overcharged for me. I didn't take a closer look on it yet. Before that I want to ask, if someone of you knows of small and free jpeg libs?! (Also other lib's like for C++ or perhaps Fortran would be interesting, but
9
3549
by: peter.mosley | last post by:
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:- $ python pil_jpg.py Exception in Tkinter callback Traceback (most recent call last):
21
21346
by: cman | last post by:
does anyone know why i can't generate images with: header("Content-type:image/jpeg"); imagejpeg($img_number); i've tried different examples but i always get a text output as if the header doesn't make a difference at all. <?php //random_number.php $img_number = imagecreate(100,50);
0
2224
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.
5
13915
pbmods
by: pbmods | last post by:
Configuring PHP 5.2.3 with GD support for Mac OS X PHP 5.2.3 does not seem to want to configure with GD support on Mac OS X for some reason. When configuring, you may notice this error: configure: error: GD build test failed. Please check the config.log for details. Checking config.log yields the following: configure:42434: gcc -o conftest -g -O2 -no-cpp-precomp -L/usr/local/lib -L/usr/local/lib conftest.c -L -lfreetype -lpng...
11
5382
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
9563
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
9386
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
10145
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
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,...
0
9822
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
8822
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
6642
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
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2793
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.