How to remove image watermarks with one line of Python code

WBOY
Release: 2023-04-19 20:13:05
forward
1910 people have browsed it

Run the following code

# pip install poimage
import poimage
# 支持jpg、png等所有图片格式
poimage.del_watermark(
    input_image=r"D:\test\程序员晚枫\加了水印的图片.jpg",
    output_image=r'D:\test\程序员晚枫\保存为去除了水印的图片.jpg')
Copy after login

The effect achieved is as follows

How to remove image watermarks with one line of Python code

Existing function

As of the time of publishing this article, In addition to removing watermarks, the poimage library has the following functions:

Function of 1 line of code Click to view the code
add_watermark Add watermark to picture
down4img Download picture
txt2wordcloud Generate word cloud image
pencil4img Portrait to sketch
image2gif Image to Gif

The above is the detailed content of How to remove image watermarks with one line of Python code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template