image-manipulation

Automatically adding watermark on image download

半腔热情 提交于 2020-06-29 07:20:14
问题 Is it possible to add a watermark when someone downloads an image from your website? If yes, what's the best way to do it? Thanks in advance. 回答1: If you mean when Right Click -> Save ing it, thats not possible I'm afraid. If you generally mean that you have a dedicated download button or link, You could make It would redirect the request through a PHP file that will add the needed watermark and generate a new image file for download. 回答2: I would suggest using a function imagecopymerge() to

Using PIL or a Numpy array, how can I remove entire rows from an image?

馋奶兔 提交于 2020-05-29 04:13:12
问题 I would like to know how I could remove entire rows from an image, preferably based on the color of the row? Example: I have an image that is 5 pixels in height, the top two rows and the bottom two rows are white and the middle row is black. I would like to know how I could get PIL to identify this row of black pixels, then, remove the entire row and save the new image. I have some knowledge of python and have so far been editing my images by listing the result of "getdata" so any answers

Merge small images into one without allocating full image in memory

瘦欲@ 提交于 2020-05-12 05:01:55
问题 I've to make a parallel image processing script in java, the idea is to divide the images into tiles of any size, process them, and reassemble the final image. For now i've created a function: public static BufferedImage readImg (String path, int startx, int starty, int w, int h) that returns the region of an image as BufferedImage, then i'll process it and i want to place that region in the correct position of the final image. So i've tried to make a function writeImg that uses replacePixels

Merge small images into one without allocating full image in memory

ε祈祈猫儿з 提交于 2020-05-12 04:59:08
问题 I've to make a parallel image processing script in java, the idea is to divide the images into tiles of any size, process them, and reassemble the final image. For now i've created a function: public static BufferedImage readImg (String path, int startx, int starty, int w, int h) that returns the region of an image as BufferedImage, then i'll process it and i want to place that region in the correct position of the final image. So i've tried to make a function writeImg that uses replacePixels