开发者

CodeIgniter :: how to resize and watermark image without saving it to hard disk [duplicate]

This question already has answers here: 开发者_Python百科 CodeIgniter Image Manipulation (Resize & Watermark) (2 answers) Closed 9 years ago.

I'm having a problem: I want to resize and watermark an image in CodeIgniter. But I need "dynamic_output" to be TRUE.

$this->image_lib->resize();
$this->image_lib->watermark();

But when resize function fires it returns the image directly.

I don't need to save the image to save temporary copy. Any help?


Because $config['source_image'] must be set to a relative or absolut server path it is impossible to achieve what you are trying to do with the image library.

I would recommend not doing this with dynamic output, but if you really have to, should look around for a PHP script which can either resize or watermark an image dynamically based on image URLs and use that in conjunction with either the resize/watermark function from Codeigniter's library. Or simply use an entirely different library which supports this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜