当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 插件Bilibili新版0.5.5
- 2020-08-14:数据任务的执行引擎用的哪些?
- Unity performance optimization
- #JVM 类加载机制
- STM32F030F4P6兼容灵动微MM32F031F4P6
- Using JSON webtoken (JWT) to generate token in nodejs
- Google browser realizes video playback acceleration function
- In 2020, how can wechat seal numbers be quickly lifted?
- 上海巨微专用蓝牙广播芯片
- JVM class loading mechanism
猜你喜欢
To solve the problem that the data interface is not updated after WPF binding set
WebAPI接口设计:SwaggerUI文档 / 统一响应格式 / 统一异常处理 / 统一权限验证
[elastic search engine]
Introduction to Huawei cloud micro certification examination
The method of local search port number occupation in Windows system
September 9, 2020: naked writing algorithm: two threads print numbers 1-100 in turn.
2020 database technology conference helps technology upgrade
How does cglib implement multiple agents?
2020-08-19:TCP是通过什么机制保障可靠性的?
Message queue - Analysis
随机推荐
2020-08-20:GO语言中的协程与Python中的协程的区别?
预留电池接口,内置充放电电路及电量计,迅为助力轻松搞定手持应用
C calls SendMessage to refresh the taskbar icon (the icon does not disappear at the end of forcing)
August 18, 2020: introduce Mr process?
Google browser realizes video playback acceleration function
In 2020, how can wechat seal numbers be quickly lifted?
What are the highlights of Huawei mate 40 series with HMS?
C and C / C + + mixed programming series 5 - GC collaboration of memory management
[forward] how to view UserData in Lua
The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020
Points to be considered when deleting mapping field of index in ES
C language I blog assignment 03
JVM class loading mechanism
高速公路二维码定位报警系统
Application of UHF RFID medical blood management system
Stickinengine architecture 12 communication protocol
Call analysis of start method in JNI thread and callback analysis of run method
Detect certificate expiration script
VARCHART XGantt如何在日历上表示工作日
The Interpreter pattern of behavior pattern