Skip to content

Commit

Permalink
v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotJones committed Apr 22, 2021
1 parent e0e0d2f commit 86e579b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Big Gustave #
# Big Gustave

![NuGet](https://img.shields.io/nuget/dt/BigGustave?style=flat-square)

Open, read and create PNG images in fully managed C#.

## Usage ##
## Usage

To open a PNG image from file and get some pixel values:

Expand All @@ -20,8 +22,8 @@ To open a PNG image from file and get some pixel values:

pixelRedAverage += pixel.R;

Console.WriteLine(pixelRedAverage / 2.0);
Console.WriteLine(pixelRedAverage / 2.0);

}

The PNG object has methods to inspect the header and get the pixel values. The header has properties for:
Expand Down Expand Up @@ -49,7 +51,7 @@ To get a pixel use:

Where the first argument is x (column) and the second is y (row). The `Pixel` is used for all image types, e.g. Grayscale, Colour, with/without transparency.

## Creation ##
## Creation

To create a PNG use:

Expand All @@ -63,11 +65,11 @@ To create a PNG use:
using (var memory = new MemoryStream())
{
builder.Save(memory);

return memory.ToArray();
}

You can also load a PNG into a builder which will copy all the pixel values into the builder for easy editing:

var png = Png.Create(@"C:\files\my.png");
var builder = PngBuilder.FromPng(png);
var builder = PngBuilder.FromPng(png);
2 changes: 1 addition & 1 deletion src/BigGustave/BigGustave.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageIcon>uglytoad.png</PackageIcon>
<PackageLicenseExpression>Unlicense</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/EliotJones/BigGustave</PackageProjectUrl>
<Version>1.0.3</Version>
<Version>1.0.5</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down

0 comments on commit 86e579b

Please sign in to comment.