Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7024807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:53:27+00:00 2026-05-27T23:53:27+00:00

I am developing an application that stores some static images in sqlite and I

  • 0

I am developing an application that stores some static images in sqlite and I want to retrieve the same in a imageview.
how do I do this
thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:53:27+00:00Added an answer on May 27, 2026 at 11:53 pm

    sqlite3 supports the blob type, you can save the bitmap content using the blob type.

    However, the blob type has a size limit, and to save to a blob type is difficult.

    So, I suggest to save the bitmap local or on the sdcard, and save the path in the database.

    added :

    table define a column with name ‘image’ using blob type

        Bitmap map = ...;
        ByteArrayOutputStream bufferStream = new ByteArrayOutputStream(16*1024);
        map.compress(CompressFormat.JPEG, 80, bufferStream);
        byte[] bytes = bufferStream.toByteArray();
        ContentValues values = new ContentValues();
        values.put("image", bytes);
    

    convert the image byte array, using SQLiteDatabase class method or content provider as you like:

    public long insert (String table, String nullColumnHack, ContentValues values)

    to insert to table, so it save the image to blob.

    and then: when you query the blob data, you can create the image like this:

            BitmapFactory.Options option2 = new BitmapFactory.Options();
            option2.inPreferredConfig = Bitmap.Config.RGB_565;
            // added for reducing the memory
            option2.inDither = false;
            option2.inPurgeable = true;
            return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, option2);
    

    hope it can implement your request. -):

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a database-like application that stores a a structure containing: struct Dictionary
I'm developing an Android application and i'm using a Sqlite database to store some
I am developing the application that stores current user and user's role to session
I'm developing an iphone apllication that stores some data into a database. That is
After some time of developing AJAXy application I found out, that my log files
I'm developing an application that supports multiple locales. This is done through a separate
I'm currently developing a C-module for a Java-application that needs some performance improvements (see
I'm developing an iPhone application. The application access some web service that aboug other
I'm developing this application on an iPad. It has a function that allows user
I have a small application that I'm developing, that I may want to give/sell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.