forked from shns/TgaLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TgaFileFormat decoupled from TgaImage
which allows saving another image sources and also provides simplified interface for loading TgaImage somewhere else using the same IImage interface.
- Loading branch information
Showing
4 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
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,28 @@ | ||
namespace tgalib_core; | ||
|
||
/// <summary> | ||
/// Abstraction of the image usable for simplified loading and saving routines. | ||
/// </summary> | ||
public interface IImage | ||
{ | ||
/// <summary> | ||
/// Width of the image in pixels. | ||
/// </summary> | ||
int Width { get; } | ||
|
||
/// <summary> | ||
/// Height of the image in pixels. | ||
/// </summary> | ||
int Height { get; } | ||
|
||
/// <summary> | ||
/// Pixel access. | ||
/// </summary> | ||
/// <param name="x">X coordinate of a pixel within the image.</param> | ||
/// <param name="y">Y coordinate of a pixel within the image. Note: TGA coordinate [0, 0] is a bottom left corner.</param> | ||
/// <param name="r">Red component (8 bit).</param> | ||
/// <param name="g">Green component (8 bit).</param> | ||
/// <param name="b">Blue component (8 bit).</param> | ||
/// <param name="a">Alpha component (8 bit).</param> | ||
void GetPixelRgba(int x, int y, out int r, out int g, out int b, out int a); | ||
} |
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
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