Hi,
I want to shrink the left-most 40 columns and the right-most 40 columns of an image to each 30 columns. The middle of the image should stay the same.
This method is working fine for the left side and the middle. But the right side does not shrink. What am I missing?
procedure TRoboScreenManager.BendPanelPicture(const sourcePic: TIEBitmap);
var
destPic : TIEBItmap;
const
d = 30; // destination
s = 40; // source
begin
destPic := TIEBItmap.Create(sourcePic.Width - (s-d)*2, sourcePic.Height);
sourcepic.CopyRectTo(destPic, s,0, d,0 ,DestPic.Width - d*2 ,sourcePic.Height);
sourcePic.StretchRectTo(destPic, 0,0,d,destPic.Height-1, 0,0,s,sourcePic.Height-1, rfNone, 255);
sourcePic.StretchRectTo(destPic, destPic.Width-d,0,destPic.Width-1,destPic.Height-1, sourcePic.Width-s,0,sourcePic.Width-1,sourcePic.Height-1, rfNone, 255);
sourcePic.Assign(destPic);
destPic.Free;
end;
I am using the actual version of ImageEn