Releases: loonghao/photoshop-python-api
Releases · loonghao/photoshop-python-api
0.12.0
- Refactor code struct and update API namespace, currently support two ways.
import photoshop.api as ps
from photoshop import Session
- Completed the update of all enumerated types.
from photoshop.api import enumerations
"LensType",
"AdjustmentReference",
"AnchorPosition",
"AntiAlias",
"AutoKernType",
"BMPDepthType",
"BatchDestinationType",
"BitmapConversionType",
"BitmapHalfToneType",
"BitsPerChannelType",
"BlendMode",
"ByteOrderType",
"CameraRAWSettingsType",
"CameraRAWSize",
"Case",
"ChangeMode",
"ChannelType",
"ColorBlendMode",
"ColorModel",
"ColorPicker",
"ColorProfileType",
"ColorReductionType",
"ColorSpaceType",
"CopyrightedType",
"CreateFields",
"CropToType",
"DCSType",
"DepthMaource",
"DescValueType",
"DialogModes",
"Direction",
"DisplacementMapType",
"DitherType",
"DocumentFill",
"DocumentMode",
"EditLogItemsType",
"ElementPlacement",
"EliminateFields",
"ExportType",
"ExtensionType",
"FileNamingType",
"FontPreviewType",
"ForcedColors",
"FormatOptionsType",
"GalleryConstrainType",
"GalleryFontType",
"GallerySecurityTextColorType",
"GallerySecurityTextPositionType",
"GallerySecurityTextRotateType",
"GallerySecurityType",
"GalleryThumbSizeType",
"Geometry",
"GridLineStyle",
"GridSize",
"GuideLineStyle",
"IllustratorPathType",
"Intent",
"JavaScriptExecutionMode",
"Justification",
"Language",
"LayerCompressionType",
"LayerKind",
"LayerType",
"MagnificationType",
"MatteType",
"MeasurementRange",
"MeasurementSource",
"NewDocumentMode",
"NoiseDistribution",
"OffsetUndefinedAreas",
"OpenDocumentMode",
"OpenDocumentType",
"OperatingSystem",
"Orientation",
"OtherPaintingCursors",
"PDFCompatibilityType",
"PDFEncodingType",
"PDFResampleType",
"PDFStandardType",
"PICTBitsPerPixel",
"PICTCompression",
"PaintingCursors",
"PaletteType",
"PathKind",
"PhotoCDColorSpace",
"PhotoCDSize",
"PicturePackageTextType",
"PointKind",
"PointType",
"PolarConversionType",
"PreviewType",
"PurgeTarget",
"QueryStateType",
"RadialBlurMethod",
"RadialBlurBest",
"RasterizeType",
"ReferenceFormType",
"ResampleMethod",
"ResetTarget",
"RippleSize",
"SaveBehavior",
"SaveDocumentType",
"SaveEncoding",
"SaveLogItemsType",
"SaveOptions",
"SelectionType",
"ShapeOperation",
"SmartBlurMode",
"SmartBlurQuality",
"SourceSpaceType",
"SpherizeMode",
"StrikeThruType",
"StrokeLocation",
"TargaBitsPerPixels",
"TextComposer",
"TextType",
"TextureType",
"TiffEncodingType",
"ToolType",
"TransitionType",
"TrimType",
"TypeUnits",
"UndefinedAreas",
"UnderlineType",
"Units",
"Urgency",
"Wartyle",
"WaveType",
"WhiteBalanceType",
"ZigZagType",
0.11.0: Implement doc channels (#23)
0.10.0
0.9.0
- The update allows adds metadata to the document or read metadata from the document and image file.
"""Add metadata to current active document."""
# Import built-in modules
import os
# Import local modules
from photoshop import Session
with Session(action="new_document") as ps:
doc = ps.active_document
doc.info.author = os.getenv("USERNAME")
doc.info.provinceState = "Beijing"
doc.info.title = "My Demo"
# Print all metadata of current active document.
ps.echo(doc.info)