I've create a marketplace application with woocommerce. I want to transform this application to a mobile application using the sames functions like marketplace. I've test AppMySite and when i try to upload an image it take a lot of time. I think that it must reduce the resolution of the picture but i don't know how to do this.
Asked
Active
Viewed 114 times
0
-
You must understand that images in jpg, png and many other formats are already compressed. As such, you have to reduce the resolution and maybe the number of colors to reduce the size of the images. That said, you could also have a background thread upload the image and keep the app responsive. – Tarik Nov 04 '20 at 15:31
-
I assume you use Java? – Tarik Nov 04 '20 at 15:32
-
See https://stackoverflow.com/questions/6390964/decrease-image-resolution-in-java – Tarik Nov 04 '20 at 15:33
-
The application is already responsive. My web application has also been transformed into a mobile application using AppMySite. But I want to load a photo after using the camera on the phone, it is too heavy and takes a long time to load. I'm looking for a solution to reduce the photo size when i want to upload. – hamus Nov 04 '20 at 15:36
-
See previous comment for image compression along with the link. What do you mean by heavy? High CPU? – Tarik Nov 04 '20 at 16:13
-
I mean Big size in MB – hamus Nov 05 '20 at 08:51
-
So your only problem is how long it takes to upload the file. – Tarik Nov 05 '20 at 10:05
-
yes and it caused by the size of the image – hamus Nov 05 '20 at 16:34
-
Have you tried the link I sent you? There is ready code using JAI (Java Advanced Imaging) library. Looking at the problem from another angle, the time required to upload something like 5 MB depends on the network bandwidth and the server time to store the image. So, maybe you want to look at these too. – Tarik Nov 06 '20 at 04:16