react-native-image-marker icon indicating copy to clipboard operation
react-native-image-marker copied to clipboard

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

Open qq382724935 opened this issue 1 year ago • 5 comments

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):

  • OS: [e.g. mac os]
  • nodejs: [e.g. 18.8.0]
  • react-native: [e.g. 0.71.14]
  • react-native-image-marker : [e.g. 1.2.6]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone XS]
  • OS: [e.g. iOS14.6]

Additional context Add any other context about the problem here.

qq382724935 avatar Apr 08 '24 07:04 qq382724935

IMG_3079 IMG_3078 IMG_3077

qq382724935 avatar Apr 08 '24 07:04 qq382724935

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

Iongtao avatar Jul 01 '24 07:07 Iongtao

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

应该如何处理呢,是否有相关文献或者示例

qq382724935 avatar Oct 28 '24 07:10 qq382724935

我以为调用markText,设置了scale会自动处理!

qq382724935 avatar Oct 28 '24 07:10 qq382724935