Welcome Guest, Not a member yet? Register   Sign In
Get image data after thumbnail
#1

[eluser]Leo78[/eluser]
Very simple. After the user uploads an image the system create thumb - I want to get the data AFTER the thumbnail.

Code:
.. Upload image ..

$data['pic'] = $this->upload->data();
    
// Thumbnail
$config1['image_library'] = 'gd2';
$config1['source_image'] = $data['pic']['full_path'];
$config1['maintain_ratio'] = TRUE;
$config1['master_dim'] = 'width';
$config1['width'] = 225;
$config1['height'] = 322;

$this->load->library('image_lib', $config1);
$this->image_lib->resize();

Just like the library upload has a data() method, I need the data after thumbnail, because I don't know the height of the image (I'm using master_dim).
#2

[eluser]CroNiX[/eluser]
There are several native php functions that can give you that. You just supply the path to the image and the image name so it can read it.

http://php.net/manual/en/function.getimagesize.php




Theme © iAndrew 2016 - Forum software by © MyBB