Closed StanislavMayorov closed 7 months ago
@StanislavMayorov Sorry, I didn't repreduce this issue by your code and image, there is my test result:
const uri = await Marker.markText({
backgroundImage: {
src: require('./yahaha.jpeg'),
scale: 1,
},
watermarkTexts: [
{
text: 'test',
positionOptions: {
position: Position.center,
},
style: {
color: '#ffffff80',
fontSize: 40,
textBackgroundStyle: {
color: '#F4A1A154',
},
textAlign: 'left',
},
},
],
filename: image.name,
saveFormat: ImageFormat.jpg,
})
You can test it with the example project
Btw, can you provide a minimal reproduction for me?
I can't reproduce the issue. I tried the latest and my versions of libs in the example project and I removed launchImageLibrary maxWidth: 2000, maxHeight: 2000
.
I can reproduce it only in my app when file://
path from react-native-image-picker
is used . I logged urls and checked files in the file system in my app. Image is rotated just after Marker.markText.
"react-native-image-marker": "1.1.11",
"react-native-image-picker": "3.3.2",
So it's something wrong on my side. Thank you!
iphone xs Encountering the same problem。
version 1.1.15 RN version 0.71.14 ios version 14.6
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: '',
},
},
},
],
}).then((image) => this.fileDataChange(file:///${image}
));
Hello! Thank you for the library.
Describe the bug High resolution
markText backgroundImage
image 3024 × 4032 (from iphone XR camera, HEIC/jpg) is rotated after applying watermarkTexts. 605 × 806 image works okay.To Reproduce Steps to reproduce the behavior:
Result: photo is rotated.
Expected behavior Watermark applied and photo not rotated
Development environment:
Smartphone :