uses jpeg;
procedure JpegResize(j:TJPEGImage; AWidth,AHeight:Integer);
var
b1,b2 : TBitmap;
begin
b1:=TBitmap.Create;
try
b1.Assign(j);
b2:=TBitmap.Create;
try
with b2 do begin
Width :=AWidth ;
Height:=AHeight;
Canvas.StretchDraw(Rect(0,0,AWidth,AHeight),b1);
end;
j.Assign(b2);
finally
b2.Free;
end;
finally
b1.Free;
end;
end;