Problem transforming JPEG images, no problem with PNG

See all posts Reply

Problem transforming JPEG images, no problem with PNG new!
by Jordi, 15 years, 2 months ago
Hi all!

I've done a script that uploads an image and change its size. It's working great on my local server. But when I upload it, doesn't work with jpg images. With jpgs it only uploads the image but don't tranform it. It only transforms PNG images.

With a PHPinfo test, this is the result for GD library:
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


What can I do to have support for jpg?

Thank you.Reply
Re: Problem transforming JPEG images, no problem with PNG new!
by colin, 15 years, 2 months ago
Yes, your GD setup doesn't have support for JPEG images.

You may need to recompile GD and/or PHP. See here.

On *nix systems, you will need libjpg and libjpg-devel as well as compiling PHP with the option --with-jpeg-dir'Reply