Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crop and zoom Bitmap Image

Status
Not open for further replies.

nu2Cpp

Technical User
Nov 17, 2005
1
US
I am new to C++ and using Borland Builder 6. I am designing a GUI that will let the user select a part of an image and display/copy that into another larger window. or zooming into it. I have run into a big problem that my program is not copying the right area.

Could this be a problem with scaling or I am not copying the right area? I am completely lost..
 
This is from May 2002 issue of C++Builder Developer's Journal titled "Fast Bitmap Zooming and Scrolling."
Damon Chandler said:
The VCL makes displaying a bitmap trivial—you simply drop a TImage control on your form and then load it with the desired bitmap. If you need to zoom in on the bitmap, set the TImage::Stretch property to true and then resize the TImage accordingly. If the bitmap is too large to display all at once, place the TImage within a TScrollBox. Unfortunately, this combination of controls (a TImage and a TScrollBox) is one of the least optimal ways to display an image with zooming and scrolling capabilities.

He recommends using WM_PAINT. The article covers it all but is too long to post here. Good e-mag, BTW. Worth every penny.

James P. Cottingham
-----------------------------------------
I'm number 1,229!
I'm number 1,229!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top