Advanced PSD Add-on for Graphics Mill is an additional module for Graphics Mill for .NET which allows you to work with .psd files. The most important feature of this add-on is the ability to read layers from .psd files. Such functionality enables you for example to create personalized graphics, e.g. to build online business card editor.
PSD file is an image which consists of number of layers. We can distinguish three types of layers:
Advanced PSD Add-on can read raster and text layers from a PSD file. You can get the following settings of raster layers:
Text layer in its turn has the same properties as raster layer (in particular it always includes rasterized text as a layer bitmap). In addition you can get the parameters listed below:
Advanced PSD Add-on does not have full PSD support. Only features mentioned above are supported. When you use Adobe® Photoshop® to create .psd files for this add-on, use only those layers and specify those features which can be detected by the add-on. Otherwise undetectable layers will be identified as unknown and unsupported layer parameters will be ignored.
The paragraph describes how to use Advanced PSD Add-on. More detailed information regarding Advanced PSD Add-on is described in subsequent topics.
To read the .psd file you should create the Aurigma.GraphicsMill.Codecs.AdvancedPsdReader object and open it on
this file. After that you can extract frames from this file one by one using
foreach
statement. As soon as you have got the frame you can take the layer data
from it. Use the GetBitmap(Bitmap)
method to extract the image. This method will return the instance of Aurigma.GraphicsMill.Bitmap class.
Also you can check whether the layer is text or not. Use the Type property for this purpose. After you identified the text layer you can cast it to Aurigma.GraphicsMill.Codecs.AdvancedPsdTextFrame class and extract all necessary text settings you need.
When the file is opened, it becomes locked by the application. No other application can remove or modify this file. That's why it is highly recommended to close the reader object as soon as possible.