当前位置:网站首页>Xiaomi 12s UTRA Leica watermark generation online tool
Xiaomi 12s UTRA Leica watermark generation online tool
2022-07-25 05:44:00 【Wang Leping】
Preface
Recently I saw Xiaomi 12S Utra Release , Look at the details page , I found that the photos of the demonstration are all good-looking , Including the brand 、 equipment 、 The lens 、 Location, etc , As shown in the figure below :
As a photographer , I also hope to output these information with my photos .
But at present, this kind of watermark seems to be only in Xiaomi 12S Utra In the editor of , There is no other way .
So I wrote this gadget .
Watermark Tool
- Address :https://lecepin.github.io/gen-brand-photo-pictrue/
- Github Warehouse address :https://github.com/lecepin/gen-brand-photo-pictrue

Support :
- Automatically read photos exif data , And automatically fill in the picture , Including models 、 brand 、 The focal length 、 aperture 、 Shutter 、ISO、 Shooting time 、GPS Information .
- Watermark parameters can be edited manually .
- At present, we support Apple 、 Canon 、 Dajiang 、 Fuji 、 Huawei 、 Lycra 、 millet 、 nikon 、 SONY brand .
Realization
It's easy to implement , Before reading the photo data 4KB data , Get basic information about photos , That is to say Exif data .
It's just in use recently Rust, Yu Yijiu Rust Yes WebAssembly Conduct Exif Data reading , The code is as follows :
#[wasm_bindgen]
pub fn get_exif(raw: Vec<u8>) -> JsValue {
let mut exif_data: Vec<ExifData> = Vec::new();
let exifreader = exif::Reader::new();
let mut bufreader = std::io::Cursor::new(raw.as_slice());
let exif = exifreader.read_from_container(&mut bufreader).unwrap();
for field in exif.fields() {
if let Some(_) = field.tag.to_string().find("Tag(Exif") {
continue;
}
if ["Make", "Model"].contains(&field.tag.to_string().as_str()) {
exif_data.push(ExifData {
tag: field.tag.to_string(),
value: field
.display_value()
.to_string()
.replace(
|item: char| ["\"", ","].contains(&item.to_string().as_str()),
"",
)
.trim()
.to_string(),
value_with_unit: field
.display_value()
.with_unit(&exif)
.to_string()
.replace('"', ""),
});
continue;
}
exif_data.push(ExifData {
tag: field.tag.to_string(),
value: field.display_value().to_string(),
value_with_unit: field.display_value().with_unit(&exif).to_string(),
});
}
JsValue::from_serde(&exif_data).unwrap()
}
Tested it and used Rust Exif And npm exif Execution speed of :
- Rust WebAssembly:0.6ms
- Npm exif package :5.6ms
About fast 10 About times , It's still exaggerated .
Other examples
The last to see , Use this tool to generate photos .




边栏推荐
- 线性代数(三)
- 剑指 Offer 36. 二叉搜索树与双向链表
- 剑指 Offer 54. 二叉搜索树的第k大节点
- Singing "Seven Mile fragrance" askew -- pay tribute to Jay
- Microservices and related component concepts
- PHP warehouse inventory management system source code WMS source code
- Concepts of phase velocity and phase in transmission line theory
- Leetcode 202. 快乐数(一点都不快乐)
- The difference between $write and $display in SystemVerilog
- 剑指 Offer 45. 把数组排成最小的数
猜你喜欢

Microservices and related component concepts

50 places are limited to open | with the news of oceanbase's annual press conference coming!

sqlilabs less-29

sqlilabs less-28~less-8a
![Atof(), atoi(), atol() functions [detailed]](/img/5a/a421eab897061c61467c272f122202.jpg)
Atof(), atoi(), atol() functions [detailed]

The computer accesses the Internet normally with the same network cable, and the mobile phone connects to WiFi successfully, but it cannot access the Internet

Realsense D435i 深度图优化_高精度模式

AirServer 7.3.0中文版手机设备无线传送电脑屏幕工具

Programming hodgepodge (II)

Ffmpeg notes (I) fundamentals of audio and video
随机推荐
Switch NPM source to private source library
The selection reference of Junzheng T41, T40 and T31 versions are all here
PostgreSQL learning 04 PG_ hint_ Plan installation and use, SQL optimization knowledge
R language uses rowmedians function to calculate the row data median value of all data rows in dataframe
50 places are limited to open | with the news of oceanbase's annual press conference coming!
systemverilog中function和task区别
AirServer 7.3.0中文版手机设备无线传送电脑屏幕工具
Programming hodgepodge (II)
Oracle 用户A删除用户B名下的一张表后,用户B可以通过回收站恢复被删除的表吗?
Basset: learning the regulatory code of the accessible genome with deep convolutional neural network
CCID released the "Lake warehouse integrated technology research report", and Jushan database was selected as a typical representative of domestic enterprises
Microservices and related component concepts
Detailed explanation of stepn chain game system development mode (Sports money making mode)
Common methods of JS operation array
Single sign on (one sign on, available everywhere)
HTB-Granpa
C编程 --“最大子数组的和” 的动态规划的解法
Application of hard coding and streaming integration scheme based on spice protocol in cloud games
编程大杂烩(二)
Y76. Chapter IV Prometheus large factory monitoring system and practice -- Prometheus advanced (VII)