Poor image quality after downloading from android asset - android

I'm trying to get an image to fit nicely on each screen size, the image i'm using an image which is 1351 × 2048 and i have used android asset to achieve this. It has worked fine except from the image quality is a lot more poor on all resolution. Images are too large to add to here to show difference.

I've now fixed it, the way around this is to find the correct sizes for each resolution and change this in photoshop to avoid losing quality, then add the correct size to each folder hdpi - xxxhdpi, for some reason the image will lose quality when compressing folders which is what android asset does.

Related

Are SVG files scalable in Android Studio

I'm making an Android app in Android Studio and was wondering if I import a SVG file will it be scaled down or up to fit every screen?
For example it looks good on my S20FE which is XXXHDPI screen, but will it look the same on say HDPI screen without making separate XML Density files
Edit: I do not have any device with smaller density and for some reason a virtual phone that can be run in Android Studio doesn't work for me.
According to https://developer.android.com/studio/write/vector-asset-studio , "Using vector drawables instead of bitmaps reduces the size of your APK because the same file can be resized for different screen densities without loss of image quality."
So, same SVG will be scaled depending upon the screen size.
SVG files are best because they will reduce the size of APK and quality is best. if you do not know how to use SVG files then please ask me. I will provide you step with step process.1 SVG file works for every device without quality change so you do not have to make separate 5 file for every resource.

App intro images - Android-

i'm creating some app intros for my Android app with photoshop and illustrator. The images that i'm creating are very very large in terms of resolution. How to make them fit in all android devices without distorting their propotions?
Ps: I didn't try yet to load these images into a device, is it a good idea to resize them according to the android default Dpi resolutions (ldpi,hdpi,xhdpi etc...)?
You can use Picasso. It can handle resizing and image loading for you.

Use what type of images in android app?

I am working on tutorial app and I have more than 15 images in my app. When I use .png format images all images take too much size. And I check the difference in .jpg and .png. If I take same image with dimensions 320*480 .jpg image take 18 kb but .png take 60 kb size. So what type of images do I have to use? And if .png is preferable then how to decrease size of each image without affecting resolution?
So what type of images do I have to use?
For any picture that is part of your user interface (i.e icons, logos, placeholders), use PNG. It's not even about transparency, it's about pixel perfect design.
And if .png preferable than how to decrease size of each image without affecting resolution?
There are many PNG compressors out there. Here are a couple of easy web-based ones.
http://pngcrush.com/
https://tinypng.com/
You can also get PNGcrush as a standalone executable which lets you tweak compression options, and integrate it into your build system.
Related Info: Why PNGs are bigger than they should be

Image management and scaling

I am developing a live wallpaper and I would like to know how to manage high quality images. I am quite new to android development by the way.
I got 2 questions:
1)The image I use for wallpaper creation is a vector image (2560w x 1600h, 32bit, 10mb exactly), very crispy and with really high resolution. I tried it as a wallpaper and it looks just fantastic (on my tablet). I placed it in the drawable folder. This results in a high dimension .apk file (9 Mb). Is it ok to have files this big enlarge apk dimension or it is a good practice to reduce it as much as possible?
2)When building my wallpaper from the Engine class i'd like to know, after setting the above image as a wallpaper, what is the best practice to scale it fitting XY independant of screen sizes.
PS: What i found to be perfect was the default system android use when you attempt to set an image as wallpaper. What does the system do in that case?
Thanks :)
1.)Since no android device supports resoultion bigger than 1280x760 of what I know, it is not a good practice in having images with bigger size than this as they use a lot of space for nothing.
2.)The DisplayMetrics class has everything you need related to this problem.

Background Image Quality

Android Development help please.
Can somone tell me how I might increase the quality of background images in my app? I have been using Photoshop where the images look great, then I save for the web as a png...then add it to my app... Then on the phone the image looks a little blurred.
Whats the best way to increase my image quality?
I would make sure you're saving it at an adequate resolution. I'm will to bet that "save for web" reduces the resolution to 72 dpi which may not be enough for an android handset. In photoshop, try bumping the resolution of the final png to something like 300 dpi and see if that makes a difference. From there you can experiment with different resolutions to figure out what's the smallest value you can use and still have a crisp image. Alternatively, you could just look for the documented resolution requirements.
The apparent quality of your images may also depend in the type of device you are displaying the images on. For example, if your image is saved as 72px x 72px in your image editor, then displayed with a size defined using 72 scaled pixels (sp) in android on a high pixel-density device, then the OS will stretch the image before display. As such, the pixel density of the display device can affect the apparent image quality.
You can provide different resolution images for different pixel densities by using the hdpi, mdpi and ldpi folders for drawables. See these links for more info:
Screens support
Icon design

Categories

Resources