Welcome Guest! You need to login or register to make posts.



Go to last post Go to first unread
Kartik Langalia  
#1 Posted : Monday, February 1, 2010 4:36:26 PM(UTC)
Kartik Langalia

Rank: Member

Groups: Member
Joined: 1/31/2010(UTC)
Posts: 11


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

#2 Posted : Tuesday, February 2, 2010 6:40:57 PM(UTC)

Rank: Advanced Member

Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)

I hope the following sample helps you:

// 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.

// 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.
		// Save layer image in PNG format.
		bitmap.Save(@"C:\Temp\" + "frame_" + frame.Index + ".png");
// Clean up.

Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
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.