0
我想創建水印圖像的縮略圖,但無法使其工作。該腳本似乎總是調整原始水印圖像的大小,而不使縮略圖..無論如何要完成這兩個?Codeigniter - 創建縮略圖Woes
這裏是我的代碼
$config = array();
$config['source_image'] = $data['json']->{'file_path'};
$config['new_image'] = 'copy_' . $data['json']->{'file_path'};
$config['image_library'] = 'gd2';
$config['wm_type'] = 'overlay';
$config['wm_overlay_path'] = getcwd() . '/design/new_transparency.png';
$config['wm_vrt_alignment'] = 'bottom';
$config['wm_hor_alignment'] = 'center';
$config['wm_vrt_offset'] = 20;
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 125;
$config['height'] = 125;
$this->image_lib->initialize($config);
$this->image_lib->watermark();
$this->image_lib->clear();
$this->image_lib->resize();
是不是我做錯了什麼?