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);
        }
Esempio n. 2
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) => new MagickImage(fileName, settings);
Esempio n. 3
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) => new MagickImage(file, settings);
Esempio n. 4
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) => new MagickImage(stream, settings);
Esempio n. 5
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="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);
Esempio n. 6
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) => new MagickImage(data, settings);
Esempio n. 7
0
 internal ScriptReadEventArgs(string id, MagickReadSettings readSettings, PixelReadSettings pixelReadSettings)
 {
     Id                = id;
     ReadSettings      = readSettings;
     PixelReadSettings = pixelReadSettings;
 }
Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 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));
 }