problems with thumbnails creations

Phoca Gallery - image gallery extension
ihavequestion
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 16 Oct 2010, 10:18

problems with thumbnails creations

Post by ihavequestion »

hi there!

i have small problem with the thumbnails creation in the phoca gallery

i have such problem:

"Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in"

can you tell me how to fix it?

blessed day and greetz, and thanks :)
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 10081
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: problems with thumbnails creations

Post by Benno »

Hi,
check requirements:
Requirements:

* Joomla!1.5.10 (stable or any later version)
* PHP 4.4.1 (or any later version) with GD library (graphics library for thumbnails creation).
check:
backend --> Components --> Phoca Gallery --> Phoca Gallery Control Panel --> Info --> Phoca Gallery recommended settings:
Image
Kind regards,
Benno
ihavequestion
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 16 Oct 2010, 10:18

Re: problems with thumbnails creations

Post by ihavequestion »

thank You it is all right i think, there was some strange problem on start, after that everything went good :)

blessed weekend and greetz one more time :-)
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 10081
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: problems with thumbnails creations

Post by Benno »

You`re welcome!
Kind regards,
Benno
dakke
Phoca Member
Phoca Member
Posts: 11
Joined: 13 Dec 2009, 10:44

Re: problems with thumbnails creations

Post by dakke »

I have the same problem. Checked the settings you mentioned and problem persists. I run joomla 1.5.15; upgraded to newest version. Set paginagion to 'yes'. Get the following error message:

Code: Select all

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in /.../administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '.../images/phocagallery/2010/Augustus/DSC09875.jpg' is not a valid JPEG file in /.../administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in .../administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '/.../images/phocagallery/2010/Augustus/DSC09875.jpg' is not a valid JPEG file in /.../administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in /.../administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '/.../images/phocagallery/2010/Augustus/DSC09875.jpg' is not a valid JPEG file in /.../administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214
Worth mentioning perhaps: I have over 1300 images. No idea what to do and about to move over to another component for it happens all the time... Would like to continue using the component for it is convenient when it works.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: problems with thumbnails creations

Post by Jan »

Hi, seems like your GD library has some problem with images you upload to your server.

Premature end of JPEG file

Try to see this error in Google e.g. (the image is damaged or the GD on your server cannot work with it because of some problem) :idea:

Jan
If you find Phoca extensions useful, please support the project
dakke
Phoca Member
Phoca Member
Posts: 11
Joined: 13 Dec 2009, 10:44

Re: problems with thumbnails creations

Post by dakke »

Hmmm, previous user had same problem and he did not fix the GD. Where is my error message different than his? In the error log, I at least see no difference.

What am I missing?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: problems with thumbnails creations

Post by Jan »

Hi, I don't know how the previous user solved it, as he didn't write the solution (or maybe I overlooked it)

The second what can be wrong is some problem in the jpg (in the image), so the GD library cannot read it or has some problems with working with it, trying other jpg image will say if this is the problem.

Jan
If you find Phoca extensions useful, please support the project
dakke
Phoca Member
Phoca Member
Posts: 11
Joined: 13 Dec 2009, 10:44

Re: problems with thumbnails creations

Post by dakke »

Thanks for the reply.

Did try to replace the jpg, but that did not work. It's strange, for it worked before. But at a certain point it stopped working with the error posted above.

Anything I should post to provide some more insight in what the problem might be?
dakke
Phoca Member
Phoca Member
Posts: 11
Joined: 13 Dec 2009, 10:44

Re: problems with thumbnails creations

Post by dakke »

Just to inform you:
- I reinstalled the module locally and get the same error: hence GD is not the issue (for it does not work neither locally nor remote)
- recreating thumbs of existing images is actually succesful with others pics

I did a test:
- put the succesful recreated images in the folder that does not work and that gave me the exact same error. Hence the image is not corrupt (for it was succesfully recreated in another folder)
- tried to add photo's to another folder (an empty category) and that was succesful. Hence the total amount of photo's and thumbs does not seem to be the problem
- tried to reduce the amount of pics in the category, yet that did not seem to be the problem

So:
- to doublecheck I renamed the files that were causing the problem. The error persisted and hence the only conclusion is indeed that there seems to be a problem with the pictures.
- I 'saved as' and the error is still there. However, not sure what's wrong with the files. For these files open correctly on my computer, both in preview, photoshop or any other software.
- in fact, using the url to see the pictures in FF, (url to image path) the picutre shows up as it should. hence the browser also recognizes the pictures as a regular jpg

Conclusion:
- for some reason some pictures are considered to have a 'premature end'
- those pictures nevertheless are ok when using preview, photoshop or directly inserting the url in ff
- hence something is wrong with specific pictures, yet don't know what

So in order to provide you some insight, I can send some pictures to see what is actually 'wrong' with them, or better where there is a problem with the pictures as processed in the module
Post Reply