Copy Stretch

Copy Stretch

Post by C. Bon » Sun, 08 May 2005 02:42:16


What's the most direct way to copy a given rectangular
region of one bitmap into a given rectangular region of
another? The two rectangles may have different sizes and
aspect ratios, so shrinking and stretching in both
horizontal and vertical directions is needed.
 
 
 

Copy Stretch

Post by Team » Sun, 08 May 2005 04:18:07


VCL - TCanvas::CopyRect()
Win32 API - StretchBlt()


Gambit

 
 
 

Copy Stretch

Post by Ercan MUTL » Mon, 09 May 2005 23:33:31


I do it with streching the biggest one(asp.ratio) and copying to
another one which is smallest.
 
 
 

Copy Stretch

Post by C. Bon » Tue, 10 May 2005 00:22:45


If it wouldn't be too much trouble, could you post an example? I'm
currently using an auxiliary (intermediate) bitmap, but I think that
may be unnecessary. Again, I want to take a rectangular region from
one bitmap and copy it to a rectangular region of another bitmap
where the two regions have different dimensions.