473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Issues with ImageCreateFromJPEG

Hi,

I'm struggling to get imagecreatefromjpeg to work correctly.

I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible).

If I run this:

$myimage = imagecreatefromjpeg("myfilename");

I get this error message:

Fatal error: Call to undefined function: imagecreatefromjpeg() in....

If I run this:

$myimage = @imagecreatefromjpeg("myfilename");

My program crashes out.

Any ideas?

Thanks,

Jun 15 '06 #1
4 2473
je******@gmail.com wrote:
Hi,

I'm struggling to get imagecreatefromjpeg to work correctly.

I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible).

If I run this:

$myimage = imagecreatefromjpeg("myfilename");

I get this error message:

Fatal error: Call to undefined function: imagecreatefromjpeg() in....

If I run this:

$myimage = @imagecreatefromjpeg("myfilename");

My program crashes out.

Any ideas?
Yes, you didn't install the GD libs on your system.
My bet is not one imagefunction is working.

Start to read here if you want to know how to install the stuff:
http://nl2.php.net/manual/en/ref.image.php

Regards,
Erwin Moller

Thanks,


Jun 15 '06 #2

Erwin Moller wrote:
je******@gmail.com wrote:
Hi,

I'm struggling to get imagecreatefromjpeg to work correctly.

I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible).

Yes, you didn't install the GD libs on your system.
My bet is not one imagefunction is working.

Start to read here if you want to know how to install the stuff:
http://nl2.php.net/manual/en/ref.image.php


As I said in my post, GD 2.0.28 is installed on my system. As far as I
can tell (I've not tested other functions) imagecreatetruecolor() seems
to be working fine. Though imagejpeg() is also not working.

Jun 15 '06 #3
je******@gmail.com wrote:

Erwin Moller wrote:
je******@gmail.com wrote:
> Hi,
>
> I'm struggling to get imagecreatefromjpeg to work correctly.
>
> I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible).
>

Yes, you didn't install the GD libs on your system.
My bet is not one imagefunction is working.

Start to read here if you want to know how to install the stuff:
http://nl2.php.net/manual/en/ref.image.php


As I said in my post, GD 2.0.28 is installed on my system. As far as I
can tell (I've not tested other functions) imagecreatetruecolor() seems
to be working fine. Though imagejpeg() is also not working.


Hi,

Yes, you wrote that, sorry, my bad.

What does gd_info() say?
Does that function think that jpeg is installed?

(read more here)
http://nl3.php.net/manual/en/function.gd-info.php

Also, it may be worth your time to read the usercontributed notes on the
imagecreatefromjpeg page.
Lots of them concern compileoptions for jpeg.
I cannot say if they are relevant to your situation, but they might be worth
a quick scan.

If this keeps haunting you, and you cannot find out why jpg-related
functions are not working, but the others do: Install GD by hand.
I have bad experience with pre-configured PHP-installs via installers.
Or even compile it yourself, if that is an option.

Regards,
Erwin Moller
Jun 15 '06 #4
You were right - turns out the problem is with JPEG support not being
compiled in with my installation. ISP is doing it now.

Thanks.


Erwin Moller wrote:
je******@gmail.com wrote:

Erwin Moller wrote:
je******@gmail.com wrote:

> Hi,
>
> I'm struggling to get imagecreatefromjpeg to work correctly.
>
> I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible).
>
Yes, you didn't install the GD libs on your system.
My bet is not one imagefunction is working.

Start to read here if you want to know how to install the stuff:
http://nl2.php.net/manual/en/ref.image.php


As I said in my post, GD 2.0.28 is installed on my system. As far as I
can tell (I've not tested other functions) imagecreatetruecolor() seems
to be working fine. Though imagejpeg() is also not working.


Hi,

Yes, you wrote that, sorry, my bad.

What does gd_info() say?
Does that function think that jpeg is installed?

(read more here)
http://nl3.php.net/manual/en/function.gd-info.php

Also, it may be worth your time to read the usercontributed notes on the
imagecreatefromjpeg page.
Lots of them concern compileoptions for jpeg.
I cannot say if they are relevant to your situation, but they might be worth
a quick scan.

If this keeps haunting you, and you cannot find out why jpg-related
functions are not working, but the others do: Install GD by hand.
I have bad experience with pre-configured PHP-installs via installers.
Or even compile it yourself, if that is an option.

Regards,
Erwin Moller


Jun 15 '06 #5

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

Similar topics

5
by: Daniel Hansen | last post by:
I am getting a "Fatal error: Call to undefined function: imagecreatefromjpeg() in..." error in one of my scripts, and after doing a bit of searching on the 'net I found various messages relating to...
3
by: Justin Koivisto | last post by:
On my way out the door, but will need to know this in the AM. (and no, I didn't have time to RTMF...) Can I use raw data instead of a file patch with imagecreatefromjpeg? For instance, I used...
4
by: jn | last post by:
I'm working with images from a Kodak 2MP camera. It looks like the function will only create a resource if I give it horiznotal pictures from this camera....if I give it vertical (height larger...
4
by: Mike | last post by:
hopefully this is an easy one to solve and I'm just missing something little... basically, I had a nice little website running with php, apache, etc... that uses imagecreatefromjpeg to create...
2
by: Simon Stewart | last post by:
Has anyone else experience of imagecreatefromjpeg failing with an error message about memory even though the size of the image being uploaded is nothing like the space available to the script? ...
1
by: Olivier | last post by:
Hi, I have the following code in my php script : $fhSrc = imagecreatefromjpeg($srcFile); This cause me the following error : Fatal error: Allowed memory size of 8388608 bytes exhausted (tried...
6
by: comp.lang.php | last post by:
PHP version 4.3.9 GD version 2.0.2 Whenever I use imagecreatefromjpeg(), PHP completely dies. No errors, no warnings, no notices, it dies in the following manner: If using Firefox it just...
5
by: Areric | last post by:
Ok all. I have a series of images stored in a db. Im trying to work on a script that will let me scale them based on user input. Ive hit a bit of a roadblock on this line. $orig =...
1
by: tim.landgraf | last post by:
hi there, i am experiencing a strange problem. i am iterating through a given directory, selecting only jpg - images that are then resized and inserted into a database. everything works, but if...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
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...
0
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,...
0
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...

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.