[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Image padding

Posted on 2011-02-28
6
Medium Priority
?
400 Views
Last Modified: 2013-11-19
I am stuck on this very important part and which is ruining my system.

Presently to maintain the aspect ratio Android changes the image width and height of an image i.e it pads it to maintain the aspect ratio

How can I know how many lines of pixels were added. Is there an API, formula ?

The reason is that my application adds tags to an image with x, y information on another platform . When I open it on my ANdroid device the image resolution is changed, so my tags look out of place. If I know how android calculates this I can apply the same for the orientation of my tags and work around

Your help would be greatly appreciated..Thanks in advance
0
Comment
Question by:jbajaj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 21

Accepted Solution

by:
oleggold earned 1000 total points
ID: 35003621
0
 
LVL 5

Expert Comment

by:UnConn
ID: 35008271
I think you have two choices.

- Make your layout scale.  Do not put your tags in postitions relative to pixels as they can change between device screen sizes.  Android programing best practices state this too.  If you use a layout that scales then the layout should scale relative to the image.

- Use PS instead of PX.  PX uses pixels but PS uses the scaled resolution based on DPI.
0
 

Author Comment

by:jbajaj
ID: 35025566
Hi oleggold,

  I didn't get any idea from http://www.codeweblog.com/stag/android-alchemy-formula-list/   site. Please
explain me how this site will help me. Or if you have any idea then please explain me.

Thank you.
0
 
LVL 5

Expert Comment

by:UnConn
ID: 35028966
There is one more option and this is providing graphics for each version of the screen you will support, LDPI, MDPI, and HDPI.  This assumes you are running on 1.6 and above (minSdkVersion="4")
0
 

Author Closing Comment

by:jbajaj
ID: 35190431
good
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
It’s easy to embed any of your public Prezi presentations on your website or social network to share with others. Learn how simple it is in this tutorial.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question