07-04-2007, 08:02 AM
[eluser]PoWah[/eluser]
i dont understand, why image_lib expands the image to the specified width and height parameters if there is parameter maintain_ratio = TRUE ??
i need that if an image which is smaller than specified width and height (in my case 400x600) it would remain NOT resized. Resize for me is needed only in case an image is bigger in width or height than 400x600. Whats wrong with my so simple code? Maybe I dont understand what "maintain_ratio" means?
i dont understand, why image_lib expands the image to the specified width and height parameters if there is parameter maintain_ratio = TRUE ??
Code:
$this->image_lib->clear();
$image_config["source_image"] = $image;
$image_config["maintain_ratio"] = true;
$image_config['width'] = 400;
$image_config['height'] = 600;
$this->image_lib->initialize($image_config);
$this->image_lib->resize()
i need that if an image which is smaller than specified width and height (in my case 400x600) it would remain NOT resized. Resize for me is needed only in case an image is bigger in width or height than 400x600. Whats wrong with my so simple code? Maybe I dont understand what "maintain_ratio" means?
