Nir
Nir

Reputation: 25359

PHP GD doesnt support a specifc image, any solution/workaround?

If I run

 $res=imagecreatefromJPEG ('http://www.theweddingoutlet.com/core/media/media.nl?id=29428&c=697473&h=8320018df7b40ec6eff8');

I get False + error : gd-jpeg: JPEG library reports unrecoverable error: (no further details).

What is wrong with this specific image that makes it unsupported by GD? How can I make GD support it? any workaround (I cant change the image) My GD code support many similar images without issue.

GD info: GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.2.1 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled

Upvotes: 0

Views: 256

Answers (2)

Nir
Nir

Reputation: 25359

Turns out it was netsuite setting.

Upvotes: -1

Waleed Amjad
Waleed Amjad

Reputation: 6808

The URL 'http://www.theweddingoutlet.com/core/media/media.nl?id=29428&c=697473&h=8320018df7b40ec6eff8' points to a non-existing resource and is as such not a valid JPEG file.

'http://www.theweddingoutlet.com/core/media/media.nl?id=29428' on the other hand does exist. Try that instead.

EDIT: That's funny, once you click on the second link, the first link starts working magically... some sort of server trickery going on here... In any case, just use the second URL with the id parameter.

EDIT2: @ zaf you are right. However (bear with me) if you go to:

http://www.theweddingoutlet.com/core/media/media.nl

And then to (or the original URL for that matter):

http://www.theweddingoutlet.com/core/media/media.nl?id=29428

It works :)

Upvotes: 3

Related Questions