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
2,598 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 10

Expert Comment

by:Mercantilum
ID: 10834999
0
 
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 500 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

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!

Question has a verified solution.

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

HOW TO CREATE A WEB 2.0 IMAGE WITH A REFLECTION I would like to start by saying I know Web 2.0 isn't a style. It is actually the practice of information sharing or  collaboration on the Web. It is also associated with the technology that is used …
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…
In this tutorial viewers will learn how to create a Photoshop action to apply adjustments and effects to multiple images. Open a photo for editing in Photoshop: Open the Actions window by going to Window > Actions: Start a new action by selecting th…
In this tutorial viewers will learn how to select a color range in Photoshop and how to easily apply them to multiple projects. Open an image for editing in Photoshop: Open the select Color Range Selection tool by going to Select > Color Range: Sele…

732 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