Skip to content

You want to display many images from internet in your FMX application ? This library make it easy !

License

Notifications You must be signed in to change notification settings

Kisspeace/you-did-well

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

written_on Platforms Platforms RepoSize

🖼 Image with URL 🔗

You want to display many images from internet in your FMX application ?
This library make it easy !

🔰 With TImage:

uses 
    YDW.FMX.ImageWithURL.pas, // TImageWithURL here
    YDW.FMX.ImageWithURLManager.pas, // You can use YDW.FMX.ImageWithURLManager.Skia.pas if you want .webp support
    YDW.FMX.ImageWithURLCacheManager.pas; // Cache manager that store all images in a hard drive
var CacheManager: TImageWithURLCahceManager := TImageWithURLCahceManager.Create; 
CacheManager.SetSaveAndLoadPath('cache\images\'); // Path where manager store content (directory creates automatically)

ImageManager: TImageWithURLManager := TImageWithURLManager.Create;
ImageManager.ThreadsCount := 8; // Max threads count that executes at the same time
ImageManager.CacheManager := CacheManager; // can be nil

var Image: TImageWithURL := TImageWithURL.Create(Form1);
Image.Parent := Form1;
Image.ImageManager := ImageManager;
Image.ImageURL := 'https://media.tenor.com/G1x0D7j67OgAAAAi/trust-in-my-healing-sage.gif'; { And now just set URL }
Image.ImageURL := 'C:\Windows\Web\Wallpaper\Windows\img0.jpg'; { or local file path }

🔰 With TIWUModule:

uses 
    YDW.FMX.ImageWithURL.Module.pas, // TIWUModule here
    YDW.FMX.ImageWithURLManager.pas, // You can use YDW.FMX.ImageWithURLManager.Skia.pas if you want .webp support
    YDW.FMX.ImageWithURLCacheManager.pas; // Cache manager that store all images in a hard drive
var Module: TIWUModule;
Module := TIWUModule.Create(Image1); // (TImage, TShape(TRectangle, TCircle ..))
Module := TIWUModule.Create(Image1, Image1.Bitmap); // Or set target bitmap manualy

{ Usage type #1: }
Module.ImageURL := ''; // set Url or Local file name here

{ Usage type #2: }
With IWUModule(Image1) do begin
    { Image1 is a component that have TIWUModule object in their components list }
    ImageURL := ''; // set Url or Local file name here
end;

⚠️ Known bugs:

  • 🧯 Set ImageURL property on FormCreate / FormShow can throw Access violation when (ImageWithURLManager.SyncBitmapLoadFromFile = FALSE) or (CacheManager.SyncBitmapLoadFromFile = FALSE)

About

You want to display many images from internet in your FMX application ? This library make it easy !

Topics

Resources

License

Stars

Watchers

Forks

Languages