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); }
/// <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);
/// <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);
/// <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);
/// <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);
/// <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);
internal ScriptReadEventArgs(string id, MagickReadSettings readSettings, PixelReadSettings pixelReadSettings) { Id = id; ReadSettings = readSettings; PixelReadSettings = pixelReadSettings; }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }