[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Open a Photoshop file (.psd) through vb code, manipulate it and save it as a .gif or .jpg

Posted on 2004-04-07
4
Medium Priority
?
2,695 Views
Last Modified: 2011-09-20
I know this isnt a VB.NET category but does anyone know of a way to open a photoshop image (.psd) through vb.net code and work with it? Basically I just want to open the .psd file and save it as a .gif or .jpg

Thank you!
Jim Vosika
http://www.shipdaz.com
0
Comment
Question by:jvosika
[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
4 Comments
 
LVL 6

Expert Comment

by:ren_b
ID: 10856835
the only two languages i know photoshop can interpret are javascript and applescript.

other than that, you'd have to be working with the file alone and not photoshop.
0
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 10907427
Yes you can open a .psd file from VB ( i am using VB 6.0 since i dont have VB.NET)

This is how i tested it in VB 6.0

1. Place a button in your vb form
2. On button click event :

 Private Sub Command1_Click()
Dim return_value

return_value = ShellExecute(Form1.hwnd, "Open", "c:\b.psd", "", "", SW_SHOWMAXIMIZED)

End Sub

3. On top of Button Click event write the below code.( this is only the declration of The APIs used in the button click event). These are Private... if you want to use these APIs in different forms put them in a class module....these things u may know since u are a .Net programmer .. i think....

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3

4. so the over all code will look like

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3

Private Sub Command1_Click()
Dim return_value

return_value = ShellExecute(Form1.hwnd, "Open", "c:\b.psd", "", "", SW_SHOWMAXIMIZED)

End Sub

5. and by the by Place a file named b.psd in your C Drive.

6. Click the button and Photoshop will open with b.psd

hope this helps....
thank you
kiranvj
0
 
LVL 3

Accepted Solution

by:
zapthedingbat earned 2000 total points
ID: 11124765
Adobe Photoshop have a COM interface for Photoshop they refer to the "scripting plugin" you can control all of photoshops functionality through this interface.

http://www.adobe.com/support/downloads/detail.jsp?ftpID=1536

Adobe supply documentation for using the COM interface, the Object Model and some scripting examples.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this article, I'll explain how to change the color of a selection in Photoshop. I'm sure there are a couple different ways to do this in photoshop, but this is my preferred method in Photoshop. I am using Photoshop CS6 and I will be adjusting the…
The Summer 2017 Scholarship Winners have been announced!
In this tutorial viewers will learn a few layer organization tricks and tips to improve their workflow in Photoshop. Open a multi-layer document in Photoshop: View all your layers by going Window > Layers:  To make sure your layers can be identified…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Suggested Courses

649 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