Hi,
I've a report that include a JPEG image from a file.
Because the image is not always the same (in this case you can adapt original image), I must adapt it the TPicture component by stretching it.
Depending by the size of the original JPEG the image appears not very good.
By adding the command to set Antialiasing mode in the TfrPictureView.Draw procedure of the LR_Class Unit, the result is excellent.
Below the code (line 19.):
unit LR_Class;
...
procedure TfrPictureView.Draw(aCanvas: TCanvas);
var
r: TRect;
kx, ky: Double;
w, h, w1, h1, PictureHeight, PictureWidth: Integer;
{$IFDEF LCLNOGUI}
bmp: TLazreportBitmap;
{$ELSE}
ClipRgn, PreviousClipRgn: HRGN;
ClipNeeded: Boolean;
{$ENDIF}
begin
{$IFDEF DebugLR}
DebugLnEnter('TfrPictureView.Draw INI');
{$ENDIF}
aCanvas.AntialiasingMode:=amON;
...
I don't know another way to obtain same result, so I share this solution with you.
I'm using Lazarus 2.2.0 on Windows 10.
Luca