IT Community - Software Programming, Web Development and Technical Support

JPEG Creation problem

This is a discussion on JPEG Creation problem within the PHP Programming forums, part of the Web Development category; hello friends.. i am facing some problem while creating JPEG image the error i get is Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-11-2007, 02:17 AM
JSureshkumar JSureshkumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Location: in someone's heart
Posts: 139
JSureshkumar is on a distinguished road
Send a message via Skype™ to JSureshkumar
Default JPEG Creation problem

hello friends..
i am facing some problem while creating JPEG image

the error i get is

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error:

and the image created is a blank image with 0 kb size

PHP Code:
$im=imagecreatefromjpeg("path_for_creating_jpeg_image"); 
after googling out.. for the error.. i have checked the following.

1.my server config script is..

--with-gd' '--with-zlib' '--with-curl=/usr/local' '--with-freetype' '--with-freetype-dir=/usr/X11/lib' '--with-jpeg-dir=/usr/lib'

which says that it has support for " jpeg " and the dir is pointed to "/usr/lib"

2. and my phpinfo GD shows...

GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.10
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


3. in the /usr/lib .

i checked whether.. the module "libjpeg.so " is there..
and it is present.. !

but still i am not able to solve this problem..!

any other info required from me..?

Hope to find a solution from the master minds..

Thanks
J Suresh kumar
__________________
J Suresh Kumar
Google Hacks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-13-2007, 10:49 PM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: JPEG Creation problem

If you get this error: "Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error" then check the JPEG files. If they are saved in CMYK format (instead of RGB) then GD will fail to load them
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-13-2007, 11:05 PM
JSureshkumar JSureshkumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Location: in someone's heart
Posts: 139
JSureshkumar is on a distinguished road
Send a message via Skype™ to JSureshkumar
Default Re: JPEG Creation problem

Quote:
Originally Posted by Jeyaseelansarc View Post
If you get this error: "Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error" then check the JPEG files. If they are saved in CMYK format (instead of RGB) then GD will fail to load them
Ok thanks jayaseelan..
but does it mean that. we always need to check in which format the image file saved...?(CMYK or RGB)

so according to you.. before calling the
PHP Code:
imagecreatefromjpeg 
we always need to convert the image format from CMYK format to RGB..?

is it correct..?
Thanks
J Suresh Kumar
__________________
J Suresh Kumar
Google Hacks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-16-2007, 01:07 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: JPEG Creation problem

Hi Suresh,
we have to validate the given file is a valid JPEG before creating another thumb image using imagecreatefromjpeg function. Please check ur php.ini setting for GD as "JPG Support enabled "
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-17-2007, 06:16 AM
JSureshkumar JSureshkumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Location: in someone's heart
Posts: 139
JSureshkumar is on a distinguished road
Send a message via Skype™ to JSureshkumar
Default Re: JPEG Creation problem

Quote:
Originally Posted by Jeyaseelansarc View Post
Hi Suresh,
we have to validate the given file is a valid JPEG before creating another thumb image using imagecreatefromjpeg function. Please check ur php.ini setting for GD as "JPG Support enabled "

Hi jeyaseelan..
that's what i have mentioned in my first posting..
my phpinfo says

2. and my phpinfo GD shows...
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.10
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


Hope you have not noticed...!
__________________
J Suresh Kumar
Google Hacks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract IPTC Metadata from jpeg and tiff image formats Balasubramanian.S C# Programming 27 01-06-2009 08:50 PM
Applying ICC profiles to a TIFF,JPEG files using C# oxygen C# Programming 1 02-28-2008 11:42 PM
TF30177: Team Project Creation Failed arjkhanna Server Management 2 01-31-2008 08:34 AM
PDF creation using PHP Senthilkumar PHP Programming 4 11-27-2007 07:01 AM
Reading and writing EXIF meta data from jpg/jpeg,tiff images oxygen C# Programming 0 07-15-2007 11:24 PM


All times are GMT -7. The time now is 02:42 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0