RN 图片添加水印

54 阅读1分钟
import RNPhotoManipulator from 'react-native-photo-manipulator'
export const addWatermark = async (uri: string) => {
	const texts = [
		{ position: { x: 32, y: 1000 }, text: '负责人:徐志军', textSize: 26, color: '#FFFFFF' },
		{
			position: { x: 32, y: 1040 },
			text: '地址:深圳市南山区中国储能大厦1102',
			textSize: 26,
			color: '#FFFFFF',
		},
	]
	const path = await RNPhotoManipulator.printText(uri, texts)
	return path
}