Git Product home page Git Product logo

python-watermark's Introduction

python-watermark

数字水印使用说明

Requirements

Python2.7 or Python3.6以上(测试用的python3.7)
PIL
PyPDF2
reportlab

使用pip命令安装相关的库文件

pip install PIL
pip install PyPDF2
pip install reportlab

Usage

图像数字水印的嵌入和提取:

嵌入水印 python image_watermark_embed.py [文件路径] [水印信息] [输出文件]
提取水印 python image_watermark_extract.py [文件路径]
Sample:
假定文件在当前目录下
嵌入水印 python image_watermark_embed.py input.jpg [email protected] output.jpg
提取水印 python image_watermark_extract.py output.jpg

PDF数字水印的嵌入和提取:

嵌入水印 python pdf_watermark_embed.py [文件路径] [中介文件][水印信息] [输出文件]
提取水印 python pdf_watermark_extract.py [文件路径]
Sample:
假定文件在当前目录下
嵌入水印 python pdf_watermark_embed.py input.pdf tmp.pdf [email protected] out.pdf
提取水印 python pdf_watermark_extract.py out.pdf
注:中介文件是一个临时pdf文档,程序会自动创建,在执行过程中会将水印信息嵌入在临时pdf文档中,通过后面的merge操作,将水印融合到需要嵌入水印的文件中。

图像数字水印的嵌入和验证:

A simple implementation of digital watermark based on LSB and Arnold transform
嵌入水印 python image-watermark.py [文件路径] [嵌入ID] [输出文件]
验证水印 python image-watermark-extract.py [文件路径] [验证ID]
Sample:
假定文件在当前目录下
嵌入水印 python image-watermark.py input.jpg username output.jpg
验证水印 python image-watermark_extract.py output.jpg username

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.