473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Constrain images without distorting the aspect ratio

How do I constrain images within a designated size and shape without distorting the aspect ratio.

Connie
Aug 19 '10 #1
3 2538
azrar
11
That isn't an ASP question, it's an HTML question.

Constrain only one dimension (width or height) and the other will automatically adjust itself to honor the aspect ratio.
Aug 19 '10 #2
Thank you, that seems logical but it is not working. the image is stretching to fit the box.

Connie
Aug 19 '10 #3
jhardman
3,406 Expert 2GB
azrar's answer is correct, show us your code and we will try to help and maybe even explain why his solution didn't work.

Jared
Aug 24 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ralph Freshour | last post by:
I'm trying to figure out how to write some php code that will allow me to resize a .jpg image and maintain it's aspect ratio - any help or idea's would be appreciated. Thanks...
5
by: Arthur Hsu | last post by:
Hello, I have an ImageButton that refers to an external image. How can I keep that image's aspect ratio when I set the ImageButton's size to 120x120? TIA, Arthur
2
by: Carl Gilbert | last post by:
Hi I am looking for either a component or technique to allow me to do the following: * Provide a panel with a background image * Resize the image to best fit the panel to maintain aspect...
2
by: Farce Milverk | last post by:
Hi, I'm looking for an algorithm to resize an image of arbitrary size to a "fixed" / required width and height. For example, my application requires that images be no larger than 440 pixel...
1
by: trint | last post by:
I have a gridview displaying images from sql server. The images are all different sizes, so I want to display each image at only 70 pixels wide with the right perspective of the height. here is...
0
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, Is there a property or method or any code for controlling the aspect ratio of a form(s)? Example: In Java if you create a form with Panels... when you stretch/resize the form, all...
5
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, If I create a form in Java with controls like Panels, textboxes... when I stretch/shrink the form, all the controls can grow/shrink - along with the text contained in the textboxes. This...
4
by: active | last post by:
I want an image in a tablecell to be scaled to fit the cell without distorting the image. I don't know what the image aspect ratio will be. Sometimes I'd expect to see the width fit the cell...
1
by: erictomlinson | last post by:
Is anyone out there aware of a method of being able to change the size dimensions of a swf without distorting the images/content? In other words, changing the swf file would just crop the content or...
3
by: Danny Ni | last post by:
Hi, I am looking for a way to display images with different aspect ratio into frames with fixed width and height, the problem is some images will look distorted if they are forced into fixed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.