JimmyDaddy / react-native-image-marker

🙈Adding text or icon watermark to your image using React Native👀👀
https://jimmydaddy.github.io/react-native-image-marker/
MIT License
316 stars 93 forks source link

不同图片,生成水印大小不同? #225

Open qq382724935 opened 5 months ago

qq382724935 commented 5 months ago

Describe the bug A clear and concise description of what the bug is. 不同图片,生成水印大小不同? To Reproduce Steps to reproduce the behavior: const url1 = 'https://img2.baidu.com/it/u=1195773901,4039087122&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=750'; const url2 = 'https://img0.baidu.com/it/u=3991991311,1584619367&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=735'; const url3 = 'https://img2.baidu.com/it/u=713662616,1260796043&fm=253&fmt=auto&app=120&f=JPEG?w=1026&h=684';

  1. Marker.markText({ backgroundImage: { src: 'https://img0.baidu.com/it/u=3773090653,2338589126&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500', scale: 1, }, watermarkTexts: texts.map((item) => { return { text: '让天下没有难做的生意', positionOptions: { position: Position.center }, style: { color: item?.style?.color || '#fff', fontSize: 36 }, }; }), })

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Devlopment environment(please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

qq382724935 commented 5 months ago

IMG_3079 IMG_3078 IMG_3077

Iongtao commented 2 months ago

很明显,有些图片的分辨率是不一样的,所以相同的fontSize在不同分辨率所占的大小不一样,需要自己处理