Magic.Net

Aug 14, 2015 at 7:02 AM
Edited Aug 14, 2015 at 7:04 AM
suppose i want to extract first layer/image from PSD and TIF file and convert into image ,then what would be the read process of magic.net. Does it read whole file?
Coordinator
Aug 14, 2015 at 10:58 AM
Edited Aug 14, 2015 at 10:58 AM
Only the first layer from the PSD / TIF file will be read when you create a MagickImage. The whole file will be read if you create a MagickImageCollection.
// Only the first frame
using (MagickImage image = new MagickImage("YourFile.psd"))
{
}

// All the frames
using (MagickImageCollection images = new MagickImageCollection("YourFile.psd"))
{
}