Issue: I want to upload a video or image with size >= 1MB to a web server and store it in a file but it takes about 2 mins to upload it. Any ideas about how to upload it in a shorter time?
I am using node.js as my server and the express-fileupload module to store the files.
According to my Knowledge there is no such module which can speed up the uploading in your case. As it all depends on several things like Your network speed, your server's traffic handling capability, etc.
But You can use Volley library that will handle to put your image and videos packets on the network channel as fast as possible other than that you can't do anything else.
Good Practice :
- Try to decrease your image size to some KBs.
Inspiration :
Instagram store 3 copies of images of 10 KB ,100KB and the real one. Try Image compression, that will help in speeding up uploading.
Just Coz I want to write more :
INSTAGRAM Downloading from server includes 3 Steps:
All 3 images starts downloading at the same time:
1). 10 KB the blurry image but not clear at all. Show it for few seconds to user. (Stretch to fit concept)
2). 100KB less blurry but more clear. Same show it for few seconds.
3). Real big size in MBs image now downloaded, show this beautiful image to user.
Related
I am building a flutter ebook app. When the user is reading, the images take quite a while to load since they are over 1 mb in size. This is not a problem for most users with a decent internet connection, but for many others it is. Is it possible to control the quality of the image when being loaded from the internet by controlling how much to download, similar to when you search google images and the images progressively become more vibrant and their resolution increases,but in my case I stop it at a certain quality decided by the user. Thank you.
It sounds like you need to solve this on the server side and have an option in the Flutter app to choose the quality. An example would be to have 5 versions of each image at 5 quality levels and let the user choose the quality level. You can then have a quality parameter in the url you fetch images from. Let's say that the user wants page 12 of a book with a quality level of 2, the url can be something like
"https://mybackend.com/book-title/12/2".
Implementing this solely in Flutter won't solve the internet issue. The app will still download a 1MB image and then you could compress it before showing it but that won't matter.
Hi There:) I am trying to create Image Gallery in Android, I am trying to load Thumbnails from HD images(more than 1000) from local device.
Glide.with(context)
.load(Uri.fromFile(new File(MyPhotoList.get(position).getPath()))).override(110,110)/*.thumbnail(0.1f)*/
.placeholder(R.color.colorAccent).into(holder.image);
But on scroll, RecycleView stucks and load image after few sec.(CPU: 70-80%, 180 MB, It consumes.)
(Test Device config. Deca-core 2.3 GHz, 4 Gb RAM).
Could you please suggest me, how to make smooth scrolling for image gallery.
I think this is normal behavior. On every another app launch (after the first one) glide will load those photos from its cache so it will be much smoothier.
To explain this just calculate, the phone needs to load e.g 20 photos those size together is about ~200/300 MB. Now take device's flash memory read speed. Most of devices may have about speed rate up to ~120 mb/s, so it means it may load those photos in few seconds.
Take a quick try with stock Gallery app on your phone. Open this and swipe down and see images and videos loading and compare with your app speed. Then you will know how big is difference againist those apps if any.
I have an android app which is 35 MB in size. I am using around 50 images in that app because of that scrolling is not smooth and sometimes app crashes with errors like out of memory, whereas there are other apps which are using 100 images but are smaller in size, like 2 MB or so and these app work offline also.
I want to ask why these apps are small in size? are they using any library?
Try this it may work for you
convert all your jpeg ,png,etc etc images into " webp" it may take less space and
same quality of your picture...
https://developer.android.com/studio/write/convert-webp.html#convert_images_to_webp
Don't store all images in drawable rather make small json file and fetch all the data from your app so you can get a apk with smaller size and fast
some code is also their how to get data from offline also..
Try this:
1) Reduce Images size from this website.
Tiny PNG
TinyPNG uses smart lossy compression techniques to reduce the file
size of your PNG files
2) Put images in different drawable folder.
Using this website to generate different drawable:
https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
3) Use SVG or 9 patch if it is possible.
We are trying to build a photo app for a client where large photos are required to be fetched using a web service. These photos will be high resolution JPGs ranging in size (between roughly 5 - 7 mb).
The issue we're facing is how to fetch a batch of photos (say 10-15), store them locally on the app, and allow the user to perform editing tasks on them. What I understood from my team is if we edit the high resolution photos it will crash the app due to memory. This means we will have to reduce the resolution and size of the photo, which is reasonable, but could take a while. What is the best practice to download and reduce the photos so a good user experience is maintained?
To give some background, we are build the app for both Android and IOS. The features expected are typical swipe, pinch, editing with basic editing and advance editing like frames, text overlay, etc.
Not sure this is a UX question so much as about app architecture.
Maybe better suited to StackOverflow or another stack exchange site instead, but I'll try to approach it from a UX angle...
USER EXPECTATIONS
Do your users expect to edit high-res & have control over maintaining maximum quality? Or are they casual users just interested in making funny pix & won't care about loss of quality?
If they expect to have control, you could check disc space or device capability before downloading & offer them a choice of smaller size vs. slower response time.
For example, if they're on an older non-retina/low-pixel-density device, display an alert that editing high-res images might be difficult & offer a smaller version as an alternative.
How will saving/uploading edited versions work? Users might be upset if they overwrite originals w/lower quality versions & weren't given an option to "save as" or set quality level.
USE CASES & DEVICE SPECIFICS
Assumption: A user on a mobile device will only work on 1 image (maybe 2) at a time.
No mobile device is large enough to show multiple high-res images on screen at once anyway. Keep current image in memory; only show thumbnails of others (saved on disc) until requested for editing & then swap; release/reload resources as necessary.
If your users are using older hardware (pre-retina iPhone 3GS or iPad 2 for example), then a 5-7MB image (anything >3000px per side) might be a bit slow, but newer devices take/handle 8-12MP pictures themselves. Should be well within the device's capability to open/edit one at a time.
Are you saying this is not the case?? Can't even open 1 image? Is it being saved to disc first, or opened in-app directly from web service?
Verify adequate storage space either for the whole batch beforehand, or as each image is saved
If device storage is full, cancel remaining downloads & alert user which images are missing
USABILITY & RESPONSIVENESS
Download the images asynchronously to avoid blocking the UI
Create much smaller low-res thumbnails to act as a placeholder for the high-res versions. Download & show thumbnails first to give a sense of progress, but differentiate between an image that's still loading & one that's available for editing (with a progress bar, transparency, etc).
Download in the background (as you might an "in-app purchase") and save to disc.
Download individually & save to shared location. This keeps them organized as a batch of 10-15, but lets the user start working as soon a the 1st image is available. Don't make them wait for all of them.
Could use a separate "downloads" view w/progress bars & let user continue work in another tab/view
Only once the user selects a thumbnail do you need to worry about loading/displaying the large version from disc. You can release thumbnail/loading view from memory & free up resources if necessary while the large image is being edited. Reload only as necessary.
Auto-save to disc in background to prevent loss of work & take opportunity to clean up caches & whatnot.
If working memory is already a concern, you won't have many options for undo/redo. Most image-editing apps manage this ok though, so there's a way.
I am into developing an android app which fetches images from server. A single activity downloads more than 10 images from the server. So, what should be the size of images(in bytes) so that the app runs smoothly and swiftly?
It is not the size of images that really matters..its the resolution of the image that really matters. When you try to take that image to a bitmap variable, the memory is consumed to represent each pixel of your image. Since you are working in a client server scenario, the size will become a problem when it comes to download and store the image.
If you don't need to zoom the image in your application, it is better to use image with standard resolution that matches screen size.
Its better for you to use some image manager libraries for these kind of image loading purpose, so that they will manage the memory issues to an extend. Check this post.