public function set_image_properties($path = '')
{
if ($this->is_image() && function_exists('getimagesize')) {
if (FALSE !== ($D = @getimagesize($path))) {
$types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png');
$this->image_width = $D[0];
$this->image_height = $D[1];
$this->image_type = isset($types[$D[2]]) ? $types[$D[2]] : 'unknown';
$this->image_size_str = $D[3];
// string containing height and width
}
}
return $this;
}