Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
To get the Photoshop type library do the following in Delphi:
- Project Menu > Import Type Library
- Click 'Add' and browser to the Photoshop directory (usually C:\Program Files\Adobe\Photoshop 5.x) and select 'TypeLibrary.tlb'
- Now click on 'Create Unit'
- Save this unit to the project directoy where you want to use it
- In your project add these unit to the uses clause:
uses ComObj, ActiveX, PhotoShopTypeLibrary_TLB;
- To start Photoshop:
PS: IPhotoShopApplication;
AppWasRunning: boolean;
Result: HRESULT;
Unknown: IUnknown;
AppWasRunning := False;
Result := GetActiveObject(CLASS_Phot
if (Result = MK_E_UNAVAILABLE) then
PS := CoPhotoshopApplication.Cre
else begin
{ make sure no other error occurred during GetActiveObject }
OleCheck(Result);
OleCheck(Unknown.QueryInte
AppWasRunning := True;
end;
- To make it visible:
PS.Set_Visible(true);
- To stop Photoshop:
PS.Quit;
- To load and save a picture:
Pic: IAutoPSDoc;
Pic := PS.Open('Picture.psd');
Pic.SaveTo('Picture2.psd')
- To play an action:
PS.PlayAction('Large Round Button');
- To apply a filter (plugin) to the active picture:
AC: IActionControl;
AD: IActionDescriptor;
AC := PS.MakeControlObject;
AD := PS.MakeDescriptor;
AD.PutDouble(phKeyRadius, 10.3);
AC.Play(phEventGaussianBlu
or
AC := PS.MakeControlObject;
AD := PS.MakeDescriptor;
AD.PutInteger(phKeyAmount,
AC.Play(phEventSpherize, AD, phDialogSilent);
More info can be found in the SDK document 'Photoshop OLE Automation.pdf'.
Regards,
Epsylon.