Refer to the following methods for uploading images and generating thumbnails and adding watermarks by using CI on the Internet.
The first step is to upload the original image and set the file name to 123.jpg.
Step 2: Use the uploaded image 123.jpg to generate a picture 23_t.jpg
Step 3: Add a watermark on the watermark 23_t.jpg
The server with 123.jpg 123_t.jpg at the end
I want to know if I can directly use abc.jpg to generate a thumbnail before uploading abc.jpg in the first step? (The reason is that you do not want to upload the source image or delete the file after uploading it)
Step 3 and Step 2 cannot be fully merged. Why do I need to scale down and add a watermark at the same time with 123.jpg?
Reply content:
The following describes how to upload images and generate thumbnails and watermarks using CI on the Internet:
The first step is to upload the original image and set the file name to 123.jpg.
Step 2: Use the uploaded image 123.jpg to generate a picture 23_t.jpg
Step 3: Add a watermark on the watermark 23_t.jpg
The server with 123.jpg 123_t.jpg at the end
I want to know if I can directly use abc.jpg to generate a thumbnail before uploading abc.jpg in the first step? (The reason is that you do not want to upload the source image or delete the file after uploading it)
Step 3 and Step 2 cannot be fully merged. Why do I need to scale down and add a watermark at the same time with 123.jpg?
Yes. However, this is not recommended.
The first method is to use the Image processing function provided by CI to process images in the memory as needed.
Second, modify the system function. (I have not tested it. You can test it by yourself and then reply to me)
Open/system/libraries/Image_lib.phpFile, which contains approximately 39th rows
var $thumb_marker = '_thumb';
To:
var $thumb_marker = '';
After the test, don't forget to reply to me.