How to add PNG to ImageList? lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2016-03-11 18:20 I'm looking how to add PNG files (e.g. 20x20) to TImagelist. I cannot find method to add PNG data. Can you help? ---------------------------------------------------------------------- balazsszekely · 2016-03-12 07:10 @Alextp I have no problem adding png files(20x20) to TImageList(Lazarus 1.7/FPC 3.0.0/Win 7). What is your OS, I can test if it works or not. ---------------------------------------------------------------------- AlexTP · 2016-03-12 07:55 My mistake: I can load png;  I need not TBitmap but other class ---------------------------------------------------------------------- wp · 2016-03-12 10:25 You mean to add at runtime since there is no TCustomImageList.AddPng method? This is approximately what the image list editor is doing, it should work for all image types that Laz can read: 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.Button1Click(Sender: TObject);var  srcBmp: TBitmap;  picture: TPicture;begin  Picture := TPicture.Create;  try    Picture.LoadFromFile(Filename);    SrcBmp := TBitmap.Create;    SrcBmp.Assign(Picture.Graphic);    ImageList1.Add(SrcBmp, nil);  finally    Picture.Free;  end;end; ---------------------------------------------------------------------- AlexTP · 2016-03-12 10:42 Yes I mean runtime; I solved using ImageList.Add( )