請不要創建縮略圖我在考慮codeigniter圖像類是否內置或自動跳過創建縮略圖 如果源圖像的寬度/高度小於拇指寬度/高度你設置。如果源圖像寬度/高度小於拇指寬度/高度
如果不是,該如何處理?
我也做了縮略圖生成,但如果我上傳寬度:200像素高度:200像素的圖像和 我的拇指設置寬度:400像素高度:400像素拇指仍然會創建,使拇指 看壞。
編輯
$config['config_here'];
$this->load->library('image_lib', $config);
if($arr['image_width'] <= $config['width'] && $arr['image_height'] <= $config['height']) {
//I don't want to resize the image BUT I want it to copy to a filename with thumb_marker
//How to do it because I already have the $config['create_thumb'] = TRUE; at above.
}else{
$this->image_lib->resize();
}
我認爲你需要擴展圖像庫檢查庫的調整大小方法$ this-> orig_width> $ this-> width或height然後你ne編輯調整它的大小。它會工作 – umefarooq
好吧,將嘗試它。 – vzhen
@umefarooq你能再次看到我編輯的問題嗎? – vzhen