|
@@ -1930,7 +1930,7 @@ begin
|
|
Frame.GetSize(Width, Height);
|
|
Frame.GetSize(Width, Height);
|
|
|
|
|
|
Clipper := nil;
|
|
Clipper := nil;
|
|
- if (not ASrc.IsEmpty) and (ASrc.Width < Width) and (ASrc.Height < Height) then begin
|
|
|
|
|
|
+ if (not ASrc.IsEmpty) and ((ASrc.Width < Width) or (ASrc.Height < Height)) then begin
|
|
WRect.X := Trunc(ASrc.Left);
|
|
WRect.X := Trunc(ASrc.Left);
|
|
WRect.Y := Trunc(ASrc.Top);
|
|
WRect.Y := Trunc(ASrc.Top);
|
|
WRect.Width := Trunc(ASrc.Width);
|
|
WRect.Width := Trunc(ASrc.Width);
|
|
@@ -1942,9 +1942,12 @@ begin
|
|
Clipper := nil;
|
|
Clipper := nil;
|
|
end;
|
|
end;
|
|
|
|
|
|
- LResult := S_FALSE;
|
|
|
|
// 缩放
|
|
// 缩放
|
|
- ImagingFactory.CreateBitmapScaler(Scaler);
|
|
|
|
|
|
+ LResult := ImagingFactory.CreateBitmapScaler(Scaler);
|
|
|
|
+ if not Succeeded(LResult) then
|
|
|
|
+ Exit;
|
|
|
|
+
|
|
|
|
+ LResult := E_FAIL;
|
|
if (Clipper <> nil) then
|
|
if (Clipper <> nil) then
|
|
LResult := Scaler.Initialize(Clipper, Trunc(ADest.Width), Trunc(ADest.Height), WICBitmapInterpolationModeLinear);
|
|
LResult := Scaler.Initialize(Clipper, Trunc(ADest.Width), Trunc(ADest.Height), WICBitmapInterpolationModeLinear);
|
|
if not Succeeded(LResult) then
|
|
if not Succeeded(LResult) then
|