I am trying to display the user profile image in capsule shape in android but the shape varies depending on image width and height so i am trying to resize the base 64 format image before uplaoding on server so that the shape of images does not varies.I have tried 2-3 example in php but as i am new to it ,i am unable to acheive
Asked
Active
Viewed 92 times
0
-
You can't resize an image using PHP before you upload it to the server. Since PHP runs on the server, it can't do anything until the image is uploaded. If you want to resize images before uploading them, you need to use canvas and Javascript. – M. Eriksson May 28 '18 at 12:27
-
@MagnusEriksson Thanks for your reply This is an android project so the base64 image format is coming from android and then with the help of restful api i am trying to resize that image before uploading.I had tried resizing the bitmap image in android but the image is getting compressed and i dont want to lose the image quality.Please help if you can – Raghunath Raut May 29 '18 at 07:34