BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hey!
I have an app where I can take a picture, crop and rotate it and then send it to a server (without saving it on the phone). My question consists of two parts.
1) Image dimensions are adjusted
The picture that I take is of a certain size, but when this is transfered to SfImageEditor the dimensions change in such a way that the sides of the taken picture are removed. This is of course not very good, so I need to have one of the following solutions:
- Adjusting the size of the camera page where the picture is taken. For that I need to know which size the image is set to in SfImageEditor and I have no idea how to figure that out.
- Making sure that the image dimensions remain the same in the SfImageEditor, thus not cutting of the edges.
2) Reducing the image byte[] size
When the image is adjusted, it is set as Stream and then set as Byte[] so that it can be transferred to the server. The size however is too large (must be below 2 MB). How can I reduce its size to under 2 MB in a cross-platform manner?
Best,
Hi Ganesh Gebhard,
Query 1: Image dimensions are adjusted
We checked the reported problem, and the SfImageEditor control will not change the dimensions of the taken picture. Please get the tested sample and video from the below attachment.
Query 2: Reducing the image byte[] size
We checked the reported problem, but we are unable to replicate the problem from our side. Please get the tested sample and video from the below attachment.
Please check the sample. If you still face the similar problem, can you revert us by modifying the sample based on your scenario along with issue reproducing video and testing device details, this will help us to provide you with a better solution at the earliest.
Regards,
Eswaran
Hi Eswaran,
I made demo which shows my issue. Is this a version issue maybe? Please take a look.
(input a valid license in App.xaml.cs)
Concerning the reduction of the image size: this is not a problem you replicate on your side. It is quite simple: there is an image in a stream and its size needs to be reduced without saving the image on the
Best,
Currently, our development team is validating the reported problem, and provide further details in two business days. We appreciate your patience until then.
Our development team needs some more time to validate the reported problems, and we will update further details by tomorrow (Feb 10, 2023).
Our development team
need some more time to validate the reported problem and we will update further
details on or before two
business days.
Query: Image dimensions are adjusted
We have checked the reported problem, and the issue is not caused by the SfImageEditor control. The actual problem occurs with the CameraView toolkit control. The SfImageEditor control only displays the provided image source. A framework issue has already been reported with the CameraView control regarding image dimension adjustment and the issue link is provided below: https://github.com/xamarin/XamarinCommunityToolkit/issues/1695
We will provide further details once we get solution from the posted query.
Query: Reducing the image byte[] size.
The size of the processed image stream is determined by the size of the input image that is loaded into the SfImageEditor control. Also, SfImageEditor do not support image compression. So, if you load an image that is less than 2 MB into the SfImageEditor, The output stream byte size will also be less than 2 MB.
Query: Image dimensions are adjusted
Thank you for the link.
Query: Reducing the image byte[] size.
It seems that the camera view causes the image to be too large as well, so I have to wait for an update for that package (or find something new).
Hi Ganesh,
Thank you for the update. We are pleased to hear that our response has been helpful to you. Please let us know if you have any further queries on this. We are happy to help.
Regards,
Preethi R