?
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,651 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

Industry Leaders: 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

Introduction When sharing photos, especially via e-mail, the large resolution images that most cameras take today make for extremely large file sizes. The time required to upload these files to forums, send in e-mails, post to blogs or even placi…
Read about why website design really matters in today's demanding market.
In this tutorial viewers will learn how to restore old photos in Photoshop (an introduction to the Clone tool) Zoom into a damaged area: Click on the "Stamp" icon to use the Clone tool. Hold the Alt key and click to select a region. Click again, and…
Make a selection using the pen tool to trace the selection. Then alter the color of the selection by using the color balance option in Adobe Photoshop.
Suggested Courses
Course of the Month8 days, 3 hours left to enroll

765 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