Welcome Guest, Not a member yet? Register   Sign In
Weird Image_lib GD Problem
#1

[eluser]matthewr[/eluser]
I get the weirdest errors! Whenever I upload JPGs saved in photoshop everything's fine, but when i upload images saved using iPhoto i get this

Quote:An Error Was Encountered

The path to the image is not correct.

Your server does not support the GD function required to process this type of image.

Here's my code:
Code:
$config['image_library'] = 'GD2';
                        $config['source_image']    = $source_file;
                        $config['new_image']    = $this->thumbnail_path.$uploaded_file_name;
                        $config['create_thumb'] = TRUE;
                        $config['maintain_ratio'] = TRUE;
                        $config['width']     = $this->width;
                        $config['height']    = $this->height;
                        $this->CI->load->library('image_lib');
                        $this->CI->image_lib->initialize($config);
                        
                        if ( ! $this->CI->image_lib->resize()){
                            show_error($this->CI->image_lib->display_errors());
                        }

Anyone has a clue? This is so weird!
#2

[eluser]Wuushu[/eluser]
Make absolutely 100% sure the source path is correct.
#3

[eluser]jedd[/eluser]
Wuushu's right, but you've probably done this already (best way to be sure is to overwrite the PS-produced jpg with the iPhoto-produced one).

It's more likely a weirdity that iPhoto pushes into its jpg's - as the GD library is pretty robust.

There's a link here that may be insightful - referring to spaces and other dubious characters within the filename, but also pointing the finger at iPhoto.

Since you're on a Win32 box, it's unlikely to be a permissions problem. You're also probably not spoilt by an abundance of rinky dinky utilities, as you would be under GNU/Linux, to interrogate the file format or do some modest command-line conversions to other formats, etc - but presumably there's some utilities you can find that'll check the conformance of the file to the JPG standard? (Not that I don't trust Steve ...)

I'm assuming that passing the iPhoto-jpg through PS solves the problem? Can you post two example JPG's anywhere?
#4

[eluser]matthewr[/eluser]
Yup, opening the iPhoto pic through photoshop solves the problem. The source path is correct because this only happens with iPhoto pictures. So weird! I'll post some iphoto pictures as soon as i get home. (At work right now)
#5

[eluser]jedd[/eluser]
My gut response would be to do two things - first, an exif dump of the same iPhoto file once it's passed through Photoshop, and compare to see if there's something in there. I suspect not. Second, a hexdump of the same file once it's gone through Photoshop .. though this is likely going to be harder to analyse.

It seems unlikely that you'd be the only person hitting an iPhoto / jpeg / GD-lib problem.
#6

[eluser]matthewr[/eluser]
Well, it's weird since all images work except for the iPhoto generated ones.
#7

[eluser]appleifreak[/eluser]
Hmm its odd because I get the same problem but I definitely built the images in Fireworks. I tried the passing through PS part and that didn't work either. Is it possible that being on a mac has something to do with it? Is there a way around what is happening?




Theme © iAndrew 2016 - Forum software by © MyBB