Need help with TImageList lazarus / 39-Graphics ---------------------------------------------------------------------- Nathros · 2016-05-23 07:03 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 procedure TForm1.Button2Click(Sender: TObject);var img: TCustomBitmap;begin   img.Create;    ImageList1.GetBitmap (0, img); end; I'm trying to get a copy of an image from the image to resize but I'm getting this exception. External SIGSEGV ---------------------------------------------------------------------- Cyrax · 2016-05-23 07:08 Use TBitmap instead of TCustomBitmap class. You need to create class instance by using this clause: 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 img := TBitmap.Create; ---------------------------------------------------------------------- Nathros · 2016-05-23 07:27 Thanks for the help, I've figured it out. I tried TBitmap and the compiler was stating that TBitmap has no create member. I've taken out the Windows unit and now working. ---------------------------------------------------------------------- Thaddy · 2016-05-23 08:25 Quote from: Nathros on May 23, 2016, 09:27:30 amThanks for the help, I've figured it out. I tried TBitmap and the compiler was stating that TBitmap has no create member. I've taken out the Windows unit and now working. I that case your unit order in the uses clause was wrong and your code picked up windows.Tbitmap. There is no need to remove the windows unit, but you have to move it, so that the LCL Tbitmap class is found before the windows TBitmap record. [edit] You can also qualify which TBitmap to use if you change your code like: 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 var  BMP:Graphics.TBitmap;begin  Bmp :=TBitmap.Create;  try    //...  finally    bmp.Free;  end;end;   If that works (in any case, also with others) you know you have to look at the uses clause order.