-
-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MagickReadSettings overloads to the Create method of MagickImag…
…eInfoFactory.
- Loading branch information
Showing
3 changed files
with
148 additions
and
5 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
src/Magick.NET.Core/Factories/IMagickImageInfoFactory{TQuantumType}.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
using System; | ||
using System.IO; | ||
|
||
namespace ImageMagick; | ||
|
||
/// <summary> | ||
/// Class that can be used to create <see cref="IMagickImageInfo"/> instances. | ||
/// </summary> | ||
/// <typeparam name="TQuantumType">The quantum type.</typeparam> | ||
public partial interface IMagickImageInfoFactory<TQuantumType> : IMagickImageInfoFactory | ||
where TQuantumType : struct, IConvertible | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance that implements <see cref="IMagickImageInfo"/>. | ||
/// </summary> | ||
/// <param name="data">The byte array to read the information from.</param> | ||
/// <param name="readSettings">The settings to use when reading the image.</param> | ||
/// <returns>A new <see cref="IMagickImageInfo"/> instance.</returns> | ||
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception> | ||
IMagickImageInfo Create(byte[] data, IMagickReadSettings<TQuantumType>? readSettings); | ||
|
||
/// <summary> | ||
/// Initializes a new instance that implements <see cref="IMagickImageInfo"/>. | ||
/// </summary> | ||
/// <param name="data">The byte array to read the information 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="readSettings">The settings to use when reading the image.</param> | ||
/// <returns>A new <see cref="IMagickImageInfo"/> instance.</returns> | ||
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception> | ||
IMagickImageInfo Create(byte[] data, int offset, int count, IMagickReadSettings<TQuantumType>? readSettings); | ||
|
||
/// <summary> | ||
/// Initializes a new instance that implements <see cref="IMagickImageInfo"/>. | ||
/// </summary> | ||
/// <param name="file">The file to read the image from.</param> | ||
/// <param name="readSettings">The settings to use when reading the image.</param> | ||
/// <returns>A new <see cref="IMagickImageInfo"/> instance.</returns> | ||
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception> | ||
IMagickImageInfo Create(FileInfo file, IMagickReadSettings<TQuantumType>? readSettings); | ||
|
||
/// <summary> | ||
/// Initializes a new instance that implements <see cref="IMagickImageInfo"/>. | ||
/// </summary> | ||
/// <param name="stream">The stream to read the image data from.</param> | ||
/// <param name="readSettings">The settings to use when reading the image.</param> | ||
/// <returns>A new <see cref="IMagickImageInfo"/> instance.</returns> | ||
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception> | ||
IMagickImageInfo Create(Stream stream, IMagickReadSettings<TQuantumType>? readSettings); | ||
|
||
/// <summary> | ||
/// Initializes a new instance that implements <see cref="IMagickImageInfo"/>. | ||
/// </summary> | ||
/// <param name="fileName">The fully qualified name of the image file, or the relative image file name.</param> | ||
/// <param name="readSettings">The settings to use when reading the image.</param> | ||
/// <returns>A new <see cref="IMagickImageInfo"/> instance.</returns> | ||
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception> | ||
IMagickImageInfo Create(string fileName, IMagickReadSettings<TQuantumType>? readSettings); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters