Search code examples
androidimagecopypackagesd-card

Copy image from sdcard to android project package


How can I copy an image from sdcard ("mnt/sdcard/pictures/pic.jpg") to the project package ("data/data/project_package"), also, is there a method which scales the image to a fixed size so that the copied image is a thumb-nail of the original


Solution

  • Unless physical data size is on your priority list, you could leave the image alone and load it using createScaledBitmap

    refer to http://developer.android.com/reference/android/graphics/Bitmap.html#createScaledBitmap%28android.graphics.Bitmap,%20int,%20int,%20boolean%29