Solved

Handle photoshop plugins with Delphi

Posted on 2000-03-02
21
1,716 Views
Last Modified: 2013-11-18
I want to make a Host Image Processing application using Delphi which can handle Adobe Photoshop plugins.

Is it possible ?

I wonder if you could give me some example... maybe some codes...  ;)
0
Comment
Question by:skycrusher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 5
  • 2
  • +4
21 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 2577203
listening..
0
 
LVL 4

Expert Comment

by:mhervais
ID: 2577414
listening too
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2577969
I have been looking for this too but did not find any component and the sdk from the PhotoShop CD's is very, very, very old...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:yk030299
ID: 2578775
listen
0
 

Author Comment

by:skycrusher
ID: 2578803
if possible, I don't want to use a component..

regards,
skycrusher
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 2579057
That the API is old is no problem. Look at the old filters like KPT which continue to work with new Photoshops.
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2618090
Listening
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2622628
0
 
LVL 17

Expert Comment

by:inthe
ID: 2622651
nice links mate ;-)

cant believe i had this site in my saved delphi links too..
(well not that page :o)
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2622681
.. I hurt my nose very bad when I bumped into it  :O|
0
 

Author Comment

by:skycrusher
ID: 2623353
where can I find the PhotoShopTypeLibrary_TLB ?

regards,
skycrusher

0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2624745
It's in the Photoshop directory. Not sure if it is the right one.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2651048
Any success..?
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2671338
0
 

Author Comment

by:skycrusher
ID: 2671880
Adjusted points from 400 to 500
0
 

Author Comment

by:skycrusher
ID: 2671881
I wanna know How to access the
Photoshop plugins using Delphi...

I haven't succes with it ;((
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2679358
Epsylon changed the proposed answer to a comment
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 500 total points
ID: 2679359
Ok, get ready 'coz here we go!

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_PhotoshopApplication, nil, Unknown);
  if (Result = MK_E_UNAVAILABLE) then
    PS := CoPhotoshopApplication.Create
  else begin
    { make sure no other error occurred during GetActiveObject }
    OleCheck(Result);
    OleCheck(Unknown.QueryInterface(IPhotoShopApplication, PS));
    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(phEventGaussianBlur, AD, phDialogSilent);

or

  AC := PS.MakeControlObject;
  AD := PS.MakeDescriptor;
  AD.PutInteger(phKeyAmount, 50);
  AC.Play(phEventSpherize, AD, phDialogSilent);



More info can be found in the SDK document 'Photoshop OLE Automation.pdf'.


Regards,

Epsylon.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2681520
If you need further help please say so...
0
 

Author Comment

by:skycrusher
ID: 2682206
thank you very much Epsylon...

Although I still have error msg, but I think I'll give the point to you (500)

I'll try to fix it by myself.

Once again thank you..

regards,
skycrusher
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2688172
What error do you get? Or have you already solved it?

Maybe you use another Delphi version...
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WCAG audit tools 1 102
Dev express lookupcombo 3 45
Tvertscrollbox like a whatsapp layout 5 51
Delphi problems to abort a printjob 9 34
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question