当前位置:网站首页>ImageMagick - add watermark
ImageMagick - add watermark
2020-11-06 22:22:00 【wffger】
background
Recently, I want to add my own watermark to my mind map , Many examples on the Internet use ImageMagick To complete . But a lot of code doesn't work locally . After some experiments , Find two ways .
Method 1
Code
stackoverflow Method improvement :
convert 'ISO_IEC 25010.jpg' \
\( \
-size 60x60 xc:none \
-fill grey \
-gravity center \
-draw "text 0,0 'wffger'" -rotate -30 -write mpr:wm \
+delete \
+clone -fill mpr:wm -draw 'color 0,0 reset' \
\) \
-compose Multiply \
-composite \
'ISO_IEC 25010-mark1.jpg'
explain
- -size, Control size , Set watermark spacing indirectly .
- xc:none, Set the watermark to have no background color ,xc by "X Constant Image".
- -fill, Set watermark font color , Can't set to white , Or be -compose Multiply Set to transparent
Method 2
Code
ImageMagick Official watermark guide :
convert -size 600x600 xc:none -fill grey \
-gravity NorthWest -draw "text 10,10 'wffger'" \
-gravity SouthEast -draw "text 5,15 'wffger'" \
miff:- |\
composite -tile - 'ISO_IEC 25010.jpg' 'ISO_IEC 25010-mark2.jpg'
explain
- -size, Set watermark image size .
- -tile, Tile the watermark .
Environmental Science
ydx@ydx-mf:~/ file $ uname -a
Linux ydx-mf 5.7.11-200.fc32.x86_64 #1 SMP Wed Jul 29 17:15:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
ydx@ydx-mf:~/ file $ rpm -qi ImageMagick
Name : ImageMagick
Epoch : 1
Version : 6.9.11.22
Release : 1.fc32
Architecture: x86_64
版权声明
本文为[wffger]所创,转载请带上原文链接,感谢
边栏推荐
- Python 100 cases
- STM32F030K6T6兼容替换灵动MM32F031K6T6
- Countdown | 2020 PostgreSQL Asia Conference - agenda arrangement of Chinese sub Forum
- Es create a new index database and copy the old index library, practice pro test effective!
- Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
- Code generator plug-in and creator preform file analysis
- Zhou Jie: database system of East China Normal University
- Introduction to the development of small game cloud
- 小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?
- Js字符串-String字符串对象方法
猜你喜欢
September 3, 2020: naked writing algorithm: loop matrix traversal.
JS string - string string object method
磁存储芯片STT-MRAM的特点
2020-08-20:GO语言中的协程与Python中的协程的区别?
Jenkins installation and deployment process
[self taught unity2d legendary game development] map editor
Google browser realizes video playback acceleration function
如何使用甘特图图层和筛选器
2020年新规,微信封号怎么快速解除?
Zhou Jie: database system of East China Normal University
随机推荐
Nonvolatile MRAM memory used in all levels of cache
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?
Unexpected element.. required element
2020-08-15: under what circumstances should data tasks be optimized?
2020 database technology conference helps technology upgrade
2020-09-09:裸写算法:两个线程轮流打印数字1-100。
September 3, 2020: naked writing algorithm: loop matrix traversal.
Call analysis of start method in JNI thread and callback analysis of run method
Application of UHF RFID medical blood management system
轻量型 GPU 应用首选 京东智联云推出 NVIDIA vGPU 实例
Design of NAND flash interface control
C and C / C + + mixed programming series 5 - GC collaboration of memory management
【涂鸦物联网足迹】物联网基础介绍篇
MRAM高速缓存的组成
Method of code refactoring -- Analysis of method refactoring
How to start the hidden preferences in coda 2 on the terminal?
2020-08-17:详细说下数据倾斜怎么解决?
20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
Interviewer: how about shardingsphere