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

  • Home
  • SEARCH
  • 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 7955699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:46:30+00:00 2026-06-04T03:46:30+00:00

I have a process that does a composite of two images, and it works

  • 0

I have a process that does a composite of two images, and it works brilliantly across all my devices *except my galaxy nexus which for reasons that I can’t understand mis-reports the dimensions of the art, over-estimating it by about 30%.

I’ve tried putting the art in both a drawable and a drawable_hdpi folder (not that that should matter) but the image is always pulled at this wrong size. I’m not an expert in DPI, but the thing is that all this is happening prior to anything being drawn to anywhere. I’m simply LOADING the bitmap from the resource and asking what its dimensions are and getting this 30% increased number. It compounds the mystery for me that the image is being blown up! So, it’s losing quality in the process as well.

Does anyone have any thoughts on what could possibly be causing this? I only have one ICS device (the Samsung Nexus) so, I’m not sure if this is an ICS issue or a device issue.

I’m getting around it by scaling the art to its original size, but it took me a while to figure out what the heck is going on and I’m curious to know if I’m overlooking something really important in how art is stored and read in ICS or if this is just a bug.

TIA

  • 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-06-04T03:46:32+00:00Added an answer on June 4, 2026 at 3:46 am

    Android automatically scales resources up (and down) when they are not available at the device’s native density (xhdpi for the Galaxy Nexus) docs and more docs

    So if you have an image that is only in the mdpi folder at 100×100 the system will automatically scale it up to 150×150 for hdpi and 200×200 for xhdpi. Obviously you are going to lose quality here so you should provide images at multiple densities (commonly hdpi and xhdpi). If you don’t want the image to be scaled at all then you can place it in the nodpi folder or the assets folder.

    mdpi is the baseline because it was the density of the first device (G1) and is 160dpi

    hdpi is 240dpi (1.666 * mdpi)

    xhdpi is 320dpi (2 * mdpi)

    Now when you are reading the resource via BitmapFactory it will report the dimensions of the image already scaled for you, not the actual resource dimensions. In most cases this is what you want to happen.

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

Sidebar

Related Questions

I have a build process that does the following: Runs TLBIMP on a number
Does anyone have any tips that could help speed up a process of breaking
I have Process objects that are monitored from two different views. A Windows.Forms.ListView (actually
On HostA, I have a process, procA , that does I/O, like so: #!/bin/bash
We have a process in WPS, that does the following: There is a web
I have two processes, A and B. B is a process that performs some
I have a function (call it Process()) that does some processing. I want to
I have a PHP process that does a bunch of stuff and I want
I have an iphone app that has a 30second process that does some network
I have two process that running at random time and I want to force

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.