예제 #1
0
 /// <summary>
 /// Reads a PSD image from a stream.
 /// </summary>
 /// <param name="stream">The stream from which to read the PSD image. The stream must support seeking.</param>
 public void Read(Stream stream)
 {
     try
     {
         Reading.ReadHeader(this, stream);
         Reading.ReadColorModeData(this, stream);
         Reading.ReadImageResources(this, stream);
         Reading.ReadLayerAndMaskInformation(this, stream);
         Reading.CreateImageDataPlaceholder(this, stream);
     }
     catch (PSDFormatException)
     {
         throw;
     }
     catch (Exception exc)
     {
         throw new PSDFormatException("decoding failed", exc);
     }
 }