Stretches source rectangle in destination rectangle.
This method doesn't merge the image with the background, but just replace it (image and alpha).
This function assumes that there is an alpha channel (if not creates it).
The PixelFormat of Dest must be ie24RGB. The source image can be ie24RGB or ie1g.
Opacity vs Transparency
Both the Opacity and Transparency parameters provide the same functionality. Transparency is the traditional ImageEn value, whereas Opacity provides easier PSD compatibility.
While they can be used in combination, generally only one will be used, i.e. leave Opacity=1 and make use of transparency, or alternatively, leave Transparency=255 and make use of Opacity. For example, for 50% opacity: Transparency = 255 and Opacity = 0.5, or Transparency = 128 and Opacity = 1.0
// Draw the full image of iebmp to the rect (100, 100, 300, 300) iebmp.StretchRectTo( ImageEnView1.IEBitmap, 100, 100, 200, 200, 0, 0, iebmp.Width, iebmp.Height, rfLanczos3 ); ImageEnView1.Update();
// Draw two images onto a bitmap above // Image 1 is centered within the top 30% of the bitmap. Image 2 is centered within the bottom 70% of the bitmap const // Size to draw image 1 Image_1_Max_Width = 900; Image_1_Max_Height = 300; // 30% of output image height
// Size to draw image 2 Image_2_Max_Width = Image_1_Max_Width; Image_2_Max_Height = 700; // 70% of output image height