public ushort[] ToShortArray(MagickGeometry geometry, string mapping) { Throw.IfNull(nameof(geometry), geometry); return(ToShortArray(geometry.X, geometry.Y, geometry.Width, geometry.Height, mapping)); }
/// <summary> /// Performs lossless compression on the file. If the new file size is not smaller the file /// won't be overwritten. /// </summary> /// <param name="file">The image file to optimize</param> public void LosslessCompress(FileInfo file) { Throw.IfNull("file", file); DoLosslessCompress(file); }
///<summary> /// Creates a new DrawableStrokeColor instance. ///</summary> ///<param name="color">The color to use.</param> public DrawableStrokeColor(MagickColor color) { Throw.IfNull("color", color); Color = color; }
/// <summary> /// Initializes a new instance of the <see cref="MagickScript"/> class. /// </summary> /// <param name="xml">The <see cref="XElement"/> that contains the script.</param> public MagickScript(XElement xml) { Throw.IfNull(nameof(xml), xml); Initialize(xml.CreateNavigator()); }
/// <summary> /// Read basic information about an image with multiple frames/pages. /// </summary> /// <param name="file">The file to read the frames from.</param> /// <returns>A <see cref="MagickImageInfo"/> iteration.</returns> /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception> public static IEnumerable <IMagickImageInfo> ReadCollection(FileInfo file) { Throw.IfNull(nameof(file), file); return(ReadCollection(file.FullName)); }
protected DrawableCoordinates(IEnumerable <TCoordinateType> coordinates, int minCount) { Throw.IfNull(nameof(coordinates), coordinates); CheckCoordinates(new List <TCoordinateType>(coordinates), minCount); }
public override void SetPixel(IEnumerable <IPixel <QuantumType> > pixels) { Throw.IfNull(nameof(pixels), pixels); base.SetPixel(pixels); }
public static void IfNull(string paramName, object value) { Throw.IfNull(paramName, value); }
/// <summary> /// Initializes a new instance of the <see cref="DrawableTextEncoding"/> class. /// </summary> /// <param name="encoding">Encoding to use.</param> public DrawableTextEncoding(Encoding encoding) { Throw.IfNull(nameof(encoding), encoding); Encoding = encoding; }
public override void SetArea(IMagickGeometry geometry, QuantumType[] values) { Throw.IfNull(nameof(geometry), geometry); base.SetArea(geometry, values); }
public override void SetByteArea(IMagickGeometry geometry, byte[] values) { Throw.IfNull(nameof(geometry), geometry); base.SetByteArea(geometry, values); }
public override QuantumType[] GetArea(IMagickGeometry geometry) { Throw.IfNull(nameof(geometry), geometry); return(base.GetArea(geometry)); }
public override ushort[] ToShortArray(IMagickGeometry geometry, string mapping) { Throw.IfNull(nameof(geometry), geometry); return(base.ToShortArray(geometry, mapping)); }
public override byte[] ToByteArray(IMagickGeometry geometry, PixelMapping mapping) { Throw.IfNull(nameof(geometry), geometry); return(base.ToByteArray(geometry, mapping.ToString())); }
public QuantumType[] GetArea(MagickGeometry geometry) { Throw.IfNull(nameof(geometry), geometry); return(GetArea(geometry.X, geometry.Y, geometry.Width, geometry.Height)); }
/// <summary> /// Initializes a new instance of the <see cref="DrawableFillColor"/> class. /// </summary> /// <param name="color">The color to use.</param> public DrawableFillColor(IMagickColor <QuantumType> color) { Throw.IfNull(nameof(color), color); Color = color; }
/// <summary> /// Returns a string that represents the current value with the specified encoding. /// </summary> /// <param name="encoding">The encoding to use.</param> /// <returns>A string that represents the current value with the specified encoding.</returns> public string ToString(Encoding encoding) { Throw.IfNull(nameof(encoding), encoding); return(encoding.GetString(_data)); }
/// <summary> /// Initializes a new instance of the <see cref="MagickScript"/> class. /// </summary> /// <param name="xml">The IXPathNavigable that contains the script.</param> public MagickScript(IXPathNavigable xml) { Throw.IfNull(nameof(xml), xml); Initialize(xml.CreateNavigator()); }
/// <summary> /// Performs compression on the specified file. With some formats the image will be decoded /// and encoded and this will result in a small quality reduction. If the new file size is not /// smaller the file won't be overwritten. /// </summary> /// <param name="file">The image file to compress.</param> /// <returns>True when the image could be compressed otherwise false.</returns> public bool Compress(FileInfo file) { Throw.IfNull(nameof(file), file); return(DoCompress(file)); }
public override void SetPixel(IPixel <QuantumType> pixel) { Throw.IfNull(nameof(pixel), pixel); SetPixelPrivate(pixel.X, pixel.Y, pixel.ToArray()); }