By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,964 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,964 IT Pros & Developers. It's quick & easy.

Issues with ImageCreateFromJPEG

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.