Reputation: 314
I'm developing the splash screen for an Android application and I wanted to simply put an image designed in Photoshop as a background. The problem is that when I save the image its resolution is 1080 x 1920, but when I add it as a drawable in Android Studio, it gives me the error "Bitmap too large..." and says that the resolution is 3240 x 5760 (exactly 3 times bigger). I can't figure out why this happens, can you please help me?
Thanks
Upvotes: 2
Views: 281
Reputation: 1
you can also use this http://nsimage.brosteins.com/ link. Go to Upload an image and a zip file will be downloaded containing 6 drawable files. Extract files and copy those 6 folders in : \app\src\main\res.
Upvotes: 0
Reputation: 28512
drawable
folder in Android actually represents drawable-mdpi
folder.
If you put images in drawable
folder they will be upscaled in devices with higher dpi. That is why you are getting larger image.
Put your image in drawable-nodpi
folder to prevent automatic up or down scaling of images.
Upvotes: 3