Xtreme .Net Talk
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Registered members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Xtreme .Net Talk
.NET
Graphics and Multimedia
Getting zoomed background image
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bufer24" data-source="post: 472959" data-attributes="member: 43633"><p>Yes I need a scaled bitmap. Imagine this:</p><p>1- put a picturebox (width=200, height=100) onto a form in designer</p><p>2 - choose a background image (image width=50, image height=300) for the picturebox</p><p>3 - set the backgroundimagelayout property to "zoom"</p><p></p><p>You´ll see that the background image zoomed nicely to fit in the picturebox by maintaining aspect ratio (ratio between width and height). </p><p></p><p>My question is: how to get the image that I actually see in the picturebox?</p><p></p><p>Sure, one way is to compare the aspect ratio of original image with the aspect ratio of the picturebox, calculate the actual size and then scale the original image to that. But is there some easier way?</p></blockquote><p></p>
[QUOTE="bufer24, post: 472959, member: 43633"] Yes I need a scaled bitmap. Imagine this: 1- put a picturebox (width=200, height=100) onto a form in designer 2 - choose a background image (image width=50, image height=300) for the picturebox 3 - set the backgroundimagelayout property to "zoom" You´ll see that the background image zoomed nicely to fit in the picturebox by maintaining aspect ratio (ratio between width and height). My question is: how to get the image that I actually see in the picturebox? Sure, one way is to compare the aspect ratio of original image with the aspect ratio of the picturebox, calculate the actual size and then scale the original image to that. But is there some easier way? [/QUOTE]
Insert quotes…
Verification
Post reply
.NET
Graphics and Multimedia
Getting zoomed background image
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom