コード例 #1
0
        private PixelReadSettings CreatePixelReadSettings(XmlElement element)
        {
            if (element == null)
            {
                return(null);
            }
            PixelReadSettings result = new PixelReadSettings();

            result.Mapping      = GetValue <String>(element, "mapping");
            result.ReadSettings = CreateReadSettings(element["readSettings"]);
            result.StorageType  = GetValue <StorageType>(element, "storageType");
            return(result);
        }
コード例 #2
0
ファイル: MagickFactory.cs プロジェクト: weinre/Magick.NET
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="fileName">The fully qualified name of the image file, or the relative image file name.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(string fileName, PixelReadSettings settings) => new MagickImage(fileName, settings);
コード例 #3
0
ファイル: MagickFactory.cs プロジェクト: weinre/Magick.NET
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="file">The file to read the image from.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(FileInfo file, PixelReadSettings settings) => new MagickImage(file, settings);
コード例 #4
0
ファイル: MagickFactory.cs プロジェクト: weinre/Magick.NET
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="stream">The stream to read the image data from.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(Stream stream, PixelReadSettings settings) => new MagickImage(stream, settings);
コード例 #5
0
ファイル: MagickFactory.cs プロジェクト: weinre/Magick.NET
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="data">The byte array to read the image data from.</param>
 /// <param name="offset">The offset at which to begin reading data.</param>
 /// <param name="count">The maximum number of bytes to read.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(byte[] data, int offset, int count, PixelReadSettings settings) => new MagickImage(data, offset, count, settings);
コード例 #6
0
ファイル: MagickFactory.cs プロジェクト: weinre/Magick.NET
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="data">The byte array to read the image data from.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(byte[] data, PixelReadSettings settings) => new MagickImage(data, settings);
コード例 #7
0
 internal ScriptReadEventArgs(string id, MagickReadSettings readSettings, PixelReadSettings pixelReadSettings)
 {
     Id                = id;
     ReadSettings      = readSettings;
     PixelReadSettings = pixelReadSettings;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="fileName">The fully qualified name of the image file, or the relative image file name.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(string fileName, PixelReadSettings settings)
 {
     return(new MagickImage(fileName, settings));
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="stream">The stream to read the image data from.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(Stream stream, PixelReadSettings settings)
 {
     return(new MagickImage(stream, settings));
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="file">The file to read the image from.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(FileInfo file, PixelReadSettings settings)
 {
     return(new MagickImage(file, settings));
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance that implements <see cref="IMagickImage"/>.
 /// </summary>
 /// <param name="data">The byte array to read the image data from.</param>
 /// <param name="settings">The pixel settings to use when reading the image.</param>
 /// <returns>A new <see cref="IMagickImage"/> instance.</returns>
 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
 public IMagickImage CreateImage(byte[] data, PixelReadSettings settings)
 {
     return(new MagickImage(data, settings));
 }