• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image_create_gd

#11
And what does that produce?
Reply

#12
(01-06-2017, 09:50 AM)Knutsford Wrote:
(01-06-2017, 09:45 AM)Knutsford Wrote:
(01-06-2017, 09:25 AM)Narf Wrote: I don't understand how that shows anything or that it "has to be". You're not even showing how you're triggering image_create_gd() ...

Also, please use the code formatting provided by the forum; it's very hard to read your posts.

Sorry - the quick reply doesn't have formatting which was why. This is the code that should do the resize






Code:
if ($index >= $limit) { CONTINUE; }
            
            $image = str_replace(' ', '%20', $image);
            $image = str_replace('#', '%23', $image);
            if (strtolower(substr($image, -3)) == "png") {            
               $target = $this_dir . '/' . ++$index . '.png';
            }
            else {
                $target = $this_dir . '/' . ++$index . '.jpg';
            }
                
            if ($size == 'md') {
            
                // copy here
                copy($image, $target);
                // resize to 'md' size
                $resize_config['source_image'] = $target;
                $resize_config['new_image'] = $target;
                $resize_config['width'] = $dimensions['width'];
                $resize_config['height'] = $dimensions['height'];
                $resize_config['master_dim'] = 'width';
                
                $ci->image_lib->initialize($resize_config);
                
                if (!$ci->image_lib->resize()){
                
                   
                    $log_data = array(
                       'agent_id' => 0,
                       'status' => $ci->image_lib->display_errors(),
                       'error' => 1
                   );
               }
                       echo "kkk";




It is copying the image but not resizing it or carrying on and doing the next image in the array or creating the sm library or putting anything in the sm library
I have traced it through and I know it going past

$ci->image_lib->initialize($resize_config);

but it doesn't return from $ci->image_lib->resize()
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.