codeigniter png调整大小不起作用

时间:2016-12-30 15:07:18

标签: codeigniter resize png

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);

$ci->image_lib->resize();

适用于jpg图像,但不适用于png图像。对于png图像,它正在复制到目标目录,然后在调整大小时停止

原始尺寸为宽度= 620px高度= 413px

用于设置新尺寸的数组是数组('宽度' => 685,' height' => 526)

0 个答案:

没有答案