Resize image OSX lazarus / 39-Graphics ---------------------------------------------------------------------- Trenatos · 2018-05-05 16:44 I'm trying to figure out how to save a resized image (I'm on macOS Sierra 10.12.6) I've tried using the example from here: http://delphidabbler.com/tips/99 but the saved image isn't resized, just cropped. Using TImage I can resize it on the form, but the saved image is the original size. I did see references to StretchBlt but I can't find enough information to figure out how to apply it. Anyone got a working example for OSX of loading a file, resizing, and saving a scaled version? ---------------------------------------------------------------------- laguna · 2018-05-09 07:00 I use this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  ....    // New size + 20%     NewWith := mWidth;    NewWith := NewWith - (NewWith * 20 / 100);     AspectRatio := imgOrign.Picture.Height / imgOrign.Picture.Width;    iMain.Visible := False;    iMain.Picture.Assign(imgOrign.Picture);    mWidth := trunc(NewWith);  mHeight := round(AspectRatio * mWidth);     if ResizeBmp(iMain.Picture.Bitmap, mWidth, mHeight) = True then    begin    end;..... function TMainForm.ResizeBmp(bitmp: TBitmap; wid, hei: integer): boolean;var  TmpBmp: TBitmap;  ARect: TRect;begin  Result := False;  try    TmpBmp := TBitmap.Create;    try      TmpBmp.Width := wid;      TmpBmp.Height := hei;      ARect := Rect(0, 0, wid, hei);    TmpBmp.Canvas.StretchDraw(ARect, Bitmp);      bitmp.Assign(TmpBmp);    finally      TmpBmp.Free;    end;    Result := True;  except    Result := False;  end;end;