Adobe 23101335 Scripting Guide - Page 56

Document information, Set jpgSaveOptions = CreateObjectPhotoshop.JPEGSaveOptions

Page 56 highlights

Scripting Photoshop 3 Document object VB: Dim appRef As New Photoshop.Application Set jpgSaveOptions = CreateObject("Photoshop.JPEGSaveOptions") jpgSaveOptions.EmbedColorProfile = True jpgSaveOptions.FormatOptions = psStandardBaseline jpgSaveOptions.Matte = psNoMatte jpgSaveOptions.Quality = 1 appRef.ActiveDocument.SaveAs "c:\temp\myFile2", _ Options:=jpgSaveOptions, _ asCopy:=True, extensionType:=psLowercase JS: jpgFile = new File( "/Temp001.jpeg" ); jpgSaveOptions = new JPEGSaveOptions(); jpgSaveOptions.embedColorProfile = true; jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE; jpgSaveOptions.matte = MatteType.NONE; jpgSaveOptions.quality = 1; activeDocument.saveAs(jpgFile, jpgSaveOptions, true, Extension.LOWERCASE); 3.8.2 Document information A Photoshop document can be associated with additional information such as the author via the "File > File Info" menu. The information found in this menu-item is handled by the info (DocumentInfo) object.To change the information, reference to the info object and set its properties as shown below. AS: set docInfoRef to info of current document set copyrighted of docInfoRef to copyrighted work set owner url of docInfoRef to "http://www.adobe.com" VB: Set docInfoRef = docRef.Info docInfoRef.Copyrighted = psCopyrightedWork docInfoRef.OwnerUrl = "http://www.adobe.com" JS: docInfoRef = docRef.info; docInfoRef.copyrighted = CopyrightedType.COPYRIGHTEDWORK; docInfoRef.ownerUrl = "http://www.adobe.com"; Photoshop 7.0 Scripting Guide 56

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91

Photoshop 7.0 Scripting Guide
56
Scripting Photoshop
Document object
3
VB:
Dim appRef As New Photoshop.Application
Set jpgSaveOptions = CreateObject("Photoshop.JPEGSaveOptions")
jpgSaveOptions.EmbedColorProfile = True
jpgSaveOptions.FormatOptions = psStandardBaseline
jpgSaveOptions.Matte = psNoMatte
jpgSaveOptions.Quality = 1
appRef.ActiveDocument.SaveAs "c:\temp\myFile2", _
Options:=jpgSaveOptions, _
asCopy:=True, extensionType:=psLowercase
JS:
jpgFile = new File( "/Temp001.jpeg" );
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = 1;
activeDocument.saveAs(jpgFile, jpgSaveOptions, true,
Extension.LOWERCASE);
3.8.2 Document information
A Photoshop document can be associated with additional information such as the author via
the “File > File Info” menu.
The information found in this menu-item is handled by the
info (DocumentInfo)
object.To change the information, reference to the
info
object and set its properties as shown
below.
AS:
set docInfoRef to info of current document
set copyrighted of docInfoRef to copyrighted work
set owner url of docInfoRef to "http://www.adobe.com"
VB:
Set docInfoRef = docRef.Info
docInfoRef.Copyrighted = psCopyrightedWork
docInfoRef.OwnerUrl = "http://www.adobe.com"
JS:
docInfoRef = docRef.info;
docInfoRef.copyrighted = CopyrightedType.COPYRIGHTEDWORK;
docInfoRef.ownerUrl = "http://www.adobe.com";