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
 /// <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
 /// <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
 /// <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
 /// <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
 /// <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));
 }