☆PSDファイルを表示させる。

ニュースグループborland.public.delphi.graphicsでPSDファイル(Adobe Photoshopのファイル形式)を表示させることができるGraphicEx image libraryというライブラリが紹介されていたので試してみました。

フォームにTImageを配置して、次の処理をするだけできちんと画像が表示されました。
uses GraphicEx;

procedure TForm1.FormCreate(Sender: TObject);
var
  PSDGraphic: TPSDGraphic;
begin
  PSDGraphic := TPSDGraphic.Create;
  try
    PSDGraphic.LoadFromFile('c:\sample.psd');
    Image1.Picture.Assign(PSDGraphic);
  finally
    FreeAndNil(PSDGraphic);
  end;
end;

Psdview

もっとセンスのある画像ができないのかな・・・。



ニュースグループborland.public.delphi.graphics
delphi + PSD
2008年2月26日yannis氏からのコメント

soft-gems
www.soft-gems.net
GraphicEx image library

|