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 5987951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:53:20+00:00 2026-05-22T22:53:20+00:00

Here’s what I’m trying to do: I’m trying to load a sequence of bitmaps

  • 0

Here’s what I’m trying to do: I’m trying to load a sequence of bitmaps to display an animation. That means that I need to have a descent fps (24 fps). I need to load no more than 10 seconds of animations or about 300 bitmaps. And since it’s a live wallpaper I’m limited to manually drawing each frame.

Here’s what I tried so far:

  1. The obvious strategy: load each bitmap each frame and draw it. This is slow.
  2. Use caching. I put the bitmap loading in a seperate thread. A cache of about 20 bitmaps continously load in the background. However, I still get poor performance (about 10 fps). The culprit is slow bitmap loading.
  3. I was going to try using OpenGL but then I realized that even with OpenGL, the slow bitmap loading will still be a problem. Right? (Or am I wrong?)

So what other strategies can I use?

Here’s what I had in mind: if I use openGL, I can use smaller bitmaps (because it gives better scaling). Perhaps then I can have a bigger cache – say perhaps 3 seconds. With a larger cache, the slow bitmap loading will not be a problem, right?

Any other strategies?


Oh and this is my current bitmap loading function:

void loadNthBitmap(int i, int n) {
    try {
    buf = new 
        BufferedInputStream(assets.
                open(folder+"/"
                     +imageList[n])
                );
    tmpBitmap = BitmapFactory.
        decodeStream(buf);
    rbitmap[i] = Bitmap.createBitmap
        (tmpBitmap,
         0,0,imageWidth,imageHeight,
         transMatrix,false);
    }
    catch(IOException e) {}
}

where imageList is pre-defined list of assets and transMatrix is a rotation and scaling matrix.

  • 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-22T22:53:21+00:00Added an answer on May 22, 2026 at 10:53 pm

    What you’re trying to do (i.e. full-frame animation) is not easy. Almost all Android animation (from the Lunar Lander example in the SDK to Angry Birds) consists of moving small sprites on a relatively static background.

    The “obvious” solution to your problem would be to turn your animation into an mpeg and then decode it as a video live wallpaper, replicating the approach that this guy took here: http://forum.xda-developers.com/showthread.php?t=804720 (alternative link http://android.ccpcreations.com/vlw/)

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

Sidebar

Related Questions

Here's what I'm trying to accomplish with this program: a recursive method that checks
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here is my code (Say we have a single button on the page that
Here's the flow that I am trying to achieve: 1) User uploads an audio
Here is what I am trying to achieve in PHP: I have this string:
Here is my problem...I have a page that loads a list of clients and
Here's the deal: I'm in the process of planning a mid-sized business application that
Here's the basic setup: I have a thin bar at the top of a
Here is my problem : I have a post controller with the action create.

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.