Imagise.Compressor 24.9.1

dotnet add package Imagise.Compressor --version 24.9.1                
NuGet\Install-Package Imagise.Compressor -Version 24.9.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Imagise.Compressor" Version="24.9.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Imagise.Compressor --version 24.9.1                
#r "nuget: Imagise.Compressor, 24.9.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Imagise.Compressor as a Cake Addin
#addin nuget:?package=Imagise.Compressor&version=24.9.1

// Install Imagise.Compressor as a Cake Tool
#tool nuget:?package=Imagise.Compressor&version=24.9.1                

Imagise.Compress plugin for .NET

Imagise.Compressor plugin .NET allows to decrease the size of your images avoding quality loss. Many image formats are supported namely Png, Bmp, Dicom, Emf, Wmf, Svg, Jpeg, Jpeg2000, Tga, Tiff, Eps, Cmx, Odg, etc.

Platform Independence

Imagise.Compressor plugin for .NET can be used to develop applications on Windows Desktop (x86, x64), Windows Server (x86, x64), Windows Azure, Windows Embedded (CE 6.0 R2), as well as Linux x64. The supported platforms include .Net Core 3.1, .Net6.0, .Net7.0, .Net8.0.

New Features & Enhancements in Version 24.9

Imagise.Compressor is live.

Getting Started with Imagise.Compressor plugin for .NET

Ready to try the Imagise.Compressor plugin for .NET? You can easily add the Imagise.Compressor NuGet package to your .NET application by running the following command in the Package Manager Console in Visual Studio:

Install-Package Imagise.Compressor

If you already have Imagise.Compressor installed and want to upgrade to the latest version, simply run:

Update-Package Imagise.Compressor

This will ensure you have the most up-to-date version.

Following examples may help you with to use the compression in your application

Decrease the size of jpeg file

using Imagise.Compressor.Options.Jpeg;
using Imagise.Compressor.Options;
using Imagise.Core.Options;
using Imagise.Core;

string inputFolder = "<<your input folder>>";
string outputFolder = "<<your output folder>>";

if (!Directory.Exists(outputFolder))
{
	Directory.CreateDirectory(outputFolder);
}

using (var image = Image.Load(Path.Combine(inputFolder, "template.jpg")))
{
    var jpegOptions = new Imagise.Compressor.ImageOptions.JpegOptions
    {
         CompressionType = JpegCompressionMode.Progressive,
         ColorType = JpegCompressionColorMode.YCbCr,
         Quality = 75
    };

    image.Save(Path.Combine(outputFolder, "template.jpg"), jpegOptions);
}

Compress png image in licensed mode

using Imagise.Compressor.Options;
using Imagise.Core.Options;
using Imagise.Core.Palette;
using Imagise.Core;

string inputFolder = "<<your input folder>>";
string outputFolder = "<<your output folder>>";

Imagise.Core.Licensing.License.SetLicense("<<Path to your temporary license file>>");

if (!Directory.Exists(outputFolder))
{
	Directory.CreateDirectory(outputFolder);
}

using (var image = Image.Load(Path.Combine(inputFolder, "couple.png")))
{
    var pngOptions = new Imagise.Compressor.ImageOptions.PngOptions
    {
         CompressionLevel = 9,
         Progressive = true,
         ColorType = PngColorType.IndexedColor,
         ColorPalette = ColorPalette.GetCloseImagePalette(image, 1 << 5)
    };

    image.Save(Path.Combine(outputFolder, "couple.png"), pngOptions);
}

Apply Dicom image compression in licensed mode

using Imagise.Compressor.Options.Dicom;
using Imagise.Core;
using Imagise.Core.Creator.Source;
using Imagise.Core.Options;

string inputFolder = "<<your input folder>>";
string outputFolder = "<<your output folder>>";

Imagise.Core.Licensing.License.SetLicense("<<Path to your license file>>");

if (!Directory.Exists(outputFolder))
{
	Directory.CreateDirectory(outputFolder);
}

using (var image = Image.Load(Path.Combine(inputFolder, "template.dicom")))
{
    var dicomOptions = new Imagise.Compressor.ImageOptions.DicomOptions()
    {
          ColorType = ColorType.Grayscale8Bit, // or ColorType.Rgb24Bit for truecolor images

          Compression = new Compression
          {
                CompressionType = CompressionType.Jpeg,
                Jpeg = new Imagise.Compressor.ImageOptions.JpegOptions
                {
                     Quality = 75
                }
          },
    };

    image.Save(Path.Combine(outputFolder, "couple.dicom"), dicomOptions);
}

Trial wmf compression

using Imagise.Compressor.Options;
using Imagise.Core.Options;
using Imagise.Core.Palette;
using Imagise.Core;

string inputFolder = "<<your input folder>>";
string outputFolder = "<<your output folder>>";

Imagise.Core.Licensing.License.SetLicense("<<Path to your license file>>");

if (!Directory.Exists(outputFolder))
{
	Directory.CreateDirectory(outputFolder);
}

using (var image = Image.Load(Path.Combine(inputFolder, "template.wmf")))
{
     var wmfOptions = new Imagise.Compressor.ImageOptions.WmfOptions()
     {
         Compress = true,
     };

     image.Save(Path.Combine(outputFolder, "template.wmz"), wmfOptions);
}       

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
24.9.1 10 9/6/2024
24.9.0 1 9/6/2024
24.8.5 8 8/8/2024
24.8.4 8 8/7/2024