.NET client for the Tinify API, used for TinyPNG and TinyJPG. Tinify compresses your images intelligently. Read more at http://tinify.com.
Go to the documentation for the .NET client.
Install the API client:
Install-Package Tinify
Or add this to your project.json
:
{
"dependencies": {
"Tinify": "*",
}
}
using TinifyAPI;
class Compress
{
static void Main()
{
Tinify.Key = "YOUR_API_KEY";
Tinify.FromFile("unoptimized.png").ToFile("optimized.png").Wait();
}
}
dotnet restore
dotnet test test/Tinify.Tests
dotnet restore
TINIFY_KEY=$YOUR_API_KEY dotnet test test/Tinify.Tests.Integration
Or add a .env
file to the /test/Tinify.Tests.Integration
directory in the format
TINIFY_KEY=<YOUR_API_KEY>
This software is licensed under the MIT License. View the license.