Reputation: 347
I want to have an image show up in my Android application, but it always comes out blurry. What do I do? My image is 10000x11866 pixels, and I've made it big on purpose so that it wouldn't come out blurry, but it still does.
Here's my approach: right click the 'res' folder -> new image asset -> set icon type to
'action bar and tab icons'
What am I doing wrong?
Upvotes: 2
Views: 1573
Reputation: 144
You can just copy the image and paste it in the drawable
folder. Make sure the name of the image is in lowercase.
Also, make the dimensions smaller. There is no need for the picture to have such extreme dimensions. Especially if the image is not being zoomed. 1920 x 1080
1000 x 1000
are big enough trust me.
Post your code so we can see what's going on.
Upvotes: 1
Reputation: 1007296
Action bar and tab icons are much smaller than that, so the wizard is scaling down the image. Do not use the Image Asset Wizard for your image.
Instead, create a drawable-nodpi
directory under your existing res
directory in your module's main
source set. Then, copy the image into that drawable-nodpi
directory.
Note that you may run out of memory with an image that size, and there is no Android device with a screen resolution anywhere near that. I recommend that you reduce the resolution to something more reasonable, such as 1000x1186.
Upvotes: 6