Ok, dann hier ein entsprechender Vorschlag
Delphi-Quellcode:
unit DN.PackageProvider.GitHub;
...
implementation
uses
Graphics,
...;
function TDNGitHubPackageProvider.LoadPackageFromDirectory(
const ADirectory, AAutor:
string;
out APackage: IDNPackage ): Boolean;
...
if TFile.Exists( LPicture )
then
begin
try
LPackage.Picture.LoadFromFile( LPicture );
except
on E: EInvalidGraphic
do
begin
// nothing, then we will have no image ... who cares
// as an alternative we can load a default image from a resource
end;
end;
end;
...
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ea 0a 4c 14 0d b6 3a a4 c1 c5 b9
dc 90 9d f0 e9 de 13 da 60)