0

I download images, resize them and insert them with the follwing code found on StackOverFlow:

Navigator.Get(Image, MImage);
MImage.Position := 0;
si := HeaderFooterWithNavigation.ArticlesImages.Source.Add;
si.Name := 'Source' + IntToStr(A);
si.MultiResBitmap.LoadItemFromStream(MImage, 1);
d:=HeaderFooterWithNavigation.ArticlesImages.Destination.Add;
Layer := d.Layers.Add;
Layer.SourceRect.Rect := TRectF.Create(0, 0,
si.MultiResBitmap.Bitmaps[1].Width, si.MultiResBitmap.Bitmaps[1].Height); 
Layer.Name := si.name;

While this works, the images in my ListView end up being pixelated. How can they appear with antialias? I use Delphi 10.2 Rio and work with FMX.

Pascal Bergeron
  • 761
  • 3
  • 12
  • 27
  • Possible duplicate of [Is it possible to smooth a scaled TBitmap in Delphi?](https://stackoverflow.com/questions/2788049/is-it-possible-to-smooth-a-scaled-tbitmap-in-delphi) – GolezTrol Mar 12 '19 at 22:54
  • Btw, I've used this code in the past with great success: [Swiss Delphi Center](https://www.swissdelphicenter.ch/en/showcode.php?id=1896). The code is a bit ugly and seems to be about Jpgs, but the actual sizing works on TBitmap. I hope it works for FireMonkey too, since the class structure is different, and I'm not sure you got access to the bitmap internals in the same way. – GolezTrol Mar 12 '19 at 22:56
  • [Embarcadero forum](https://forums.embarcadero.com/message.jspa?messageID=665135) has a solution for FMX. – GolezTrol Mar 12 '19 at 22:58
  • @GolezTrol "*I'm not sure you got access to the bitmap internals*" - you do, via the [`TBitmap.Map()`](http://docwiki.embarcadero.com/Libraries/Rio/en/FMX.Graphics.TBitmap.Map) method. – Remy Lebeau Mar 12 '19 at 23:15

0 Answers0