Welcome Guest, Not a member yet? Register   Sign In
How to resize two image with imagelib
#2

[eluser]Shanto[/eluser]
Try this one:
Code:
<?php
$image = array('pippo.jpg','pluto.jpg');
for ($i=0;$i<count($image);$i++) {
    $config['image_library'] = 'gd2';
    $config['source_image'] = $image[$i];
    $config['create_thumb'] = TRUE;
    $config['maintain_ratio'] = TRUE;
    $config['width'] = 75;
    $config['height'] = 50;
    $config['new_image'] = '/tmp/'.$image[$i].'.jpg';
    $this->load->library('image_lib', $config);
    $this->image_lib->resize();
    $this->image_lib->clear();
}
?&gt;


Messages In This Thread
How to resize two image with imagelib - by El Forum - 05-22-2010, 09:13 AM
How to resize two image with imagelib - by El Forum - 05-22-2010, 11:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB