Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
how to pull layers out of the PSD file and save them into separate files?
Rank: Member
Groups: Member
Joined: 1/31/2010(UTC) Posts: 11
|
Hello, Please advise me how to pull layers out of the PSD file and save them into separate files. We will be happy if you example of getting raster layers and saving it into other file. I want to update Text & Raster Layers as per User Inputs. Edited by user Monday, February 1, 2010 4:42:37 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Administration
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, I hope the following sample helps you: Code:// Create advanced PSD reader object to work with the PSD file.
Aurigma.GraphicsMill.Codecs.AdvancedPsdReader psdReader =
new Aurigma.GraphicsMill.Codecs.AdvancedPsdReader();
// Create the bitmap object which will store the image extracted from layers.
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap();
// Open advanced PSD reader to be able to get layers.
psdReader.Open(@"C:\Temp\WorkingWithLayers.psd");
// Within each frame in reader check out that it is not unknown.
foreach (Aurigma.GraphicsMill.Codecs.AdvancedPsdFrame frame in psdReader)
{
// Skip if the layer type is unknown.
if (frame.Type != Aurigma.GraphicsMill.Codecs.PsdFrameType.Unknown)
{
// Extract the image from the layer.
frame.GetBitmap(bitmap);
// Save layer image in PNG format.
bitmap.Save(@"C:\Temp\" + "frame_" + frame.Index + ".png");
}
}
// Clean up.
psdReader.Close();
|
|
|
|
|
Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
how to pull layers out of the PSD file and save them into separate files?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.