Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotate image after adding watermark #223

Open
qq382724935 opened this issue Feb 28, 2024 · 7 comments
Open

Rotate image after adding watermark #223

qq382724935 opened this issue Feb 28, 2024 · 7 comments

Comments

@qq382724935
Copy link

Describe the bug
Automatically rotate watermark after taking photos。

Expected behavior
no rotate

Screenshots

Camera perspective
watermark (1)

Devlopment environment(please complete the following information):

  • OS: [macOs]
  • nodejs: [16.20.1]
  • react-native: [0.71.0]
  • react-native-image-marker : [1.1.15]

Smartphone (please complete the following information):

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

Additional context

RPReplay_Final1709101357.-.Compressed.with.FlexClip.mp4
@qq382724935
Copy link
Author

Marker.markText({
quality: options.quality,
backgroundImage: {
src: data.uri,
scale: 1,
},
watermarkTexts: [
{
text: 'watermark',
positionOptions: {
position: Position.center,
},
style: {
color: '#FF0000',
fontName: 'Arial-BoldItalicMT',
fontSize: 88,
shadowStyle: {
dx: 0,
dy: 0,
radius: 0,
color: '#0000FF',
},
textBackgroundStyle: {
type: TextBackgroundType.stretchX,
paddingX: 0,
paddingY: 0,
color: '',
},
},
},
],
})

@JimmyDaddy
Copy link
Owner

你好,能把原图传给我吗?我晚些时候试试看,找一下原因

@qq382724935
Copy link
Author

772039C9-5D6F-43EA-BFBE-3CFD4CD8F763
这是原图,但是好奇怪,我把文件上传到oss,想提供在线链接给你,方便测试,而我自己测试时发现使用oss在线地址加水印是正常的。。。但是我读取手机上本地文件路径确实是会旋转的。

@qq382724935
Copy link
Author

file:///var/mobile/Containers/Data/Application/8029244F-9365-4AFB-9FB3-68733FFBB376/Library/Caches/Camera/772039C9-5D6F-43EA-BFBE-3CFD4CD8F763.jpg
这是拍照后本地的存储地址,你看下是否有帮助

@wjm117
Copy link

wjm117 commented Aug 7, 2024

确实会出现旋转的问题,我也遇到了,而且ios添加水印后的图片会变得很大,原本不到2m的图片,调用水印接口后可以到30多40m.

@shubhadeep29
Copy link

shubhadeep29 commented Aug 31, 2024

issue image.zip

Check the image inside the zip. When I use it as a background image to add a watermark, the background image gets rotated, which happens only on iOS.

output:
Screenshot 2024-08-31 at 6 32 27 PM

@shubhadeep29
Copy link

@JimmyDaddy can I get some help here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants