Bsa.Image
1.1.2
See the version list below for details.
dotnet add package Bsa.Image --version 1.1.2
NuGet\Install-Package Bsa.Image -Version 1.1.2
<PackageReference Include="Bsa.Image" Version="1.1.2" />
<PackageVersion Include="Bsa.Image" Version="1.1.2" />
<PackageReference Include="Bsa.Image" />
paket add Bsa.Image --version 1.1.2
#r "nuget: Bsa.Image, 1.1.2"
#:package Bsa.Image@1.1.2
#addin nuget:?package=Bsa.Image&version=1.1.2
#tool nuget:?package=Bsa.Image&version=1.1.2
Bsa.Image
Managed image decoding and proportional resizing for .NET 6, 8 and 10.
using Bsa.Image;
var format = ImageDecoder.DetectFormat(fileBytes);
if (ImageDecoder.CanDecode(format))
{
var bitmap = ImageDecoder.Decode(fileBytes).ResizeToFit(256, 256);
// Width, Height, Stride and Pixels describe an 8-bit BGRA raster.
}
| Format | Detection | Decoding |
|---|---|---|
| PNG | Yes | Grayscale, indexed, RGB and alpha, including Adam7 |
| BMP | Yes | BITMAPINFOHEADER family, BI_RGB and RGB bitfields |
| GIF | Yes | First frame, including transparency and interlacing |
| JPEG | Yes | 8-bit sequential and progressive, including grayscale, RGB, CMYK and YCCK |
| WebP | Yes | VP8 and VP8L, including alpha and the first animation frame |
| TIFF | Yes | First page of TIFF or BigTIFF, including alpha and common compressions |
| ICO | Yes | Largest icon, with an embedded PNG or a DIB and its transparency mask |
| AVIF | Yes | Still image or first sequence frame in 8-bit BGRA, including alpha. Requires .NET JIT |
Decoded pixels use straight alpha and top-down rows. Animated GIF and WebP return the first frame.
For WebP the first frame is placed at its encoded position on a transparent canvas.
BMP RLE compression is outside the current scope. PNG decoding reads the default image from APNG.
Color profiles and orientation metadata are outside the current scope. Rasters are limited to
50 million pixels. Applications that need PNG output can pass the raster to
Bsa.Pdf.Jpeg.Imaging.PngEncoder.EncodeBgra from the separate Bsa.Pdf.Jpeg package.
JPEG decoding uses the managed JpegLibrary 0.4.32. The WebP bitstream readers are adapted from the MIT-licensed ImgSmush. The package includes the ImgSmush license. The WebP decoder uses the portable scalar color conversion on all target frameworks.
TIFF decoding uses TiffLibrary 0.6.65. AVIF uses libavif and dav1d as embedded WebAssembly translated to IL by WebAssembly for .NET. The AVIF module sources, versions and licenses are described in the decoder notes.
| Product | Versions 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- JpegLibrary (>= 0.4.32)
- TiffLibrary (>= 0.6.65)
- WebAssembly (>= 2.1.0)
-
net6.0
- JpegLibrary (>= 0.4.32)
- TiffLibrary (>= 0.6.65)
- WebAssembly (>= 1.3.0)
-
net8.0
- JpegLibrary (>= 0.4.32)
- TiffLibrary (>= 0.6.65)
- WebAssembly (>= 2.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bsa.Image:
| Package | Downloads |
|---|---|
|
Bsa.Pdf.Convert
Convert Word (.docx), Excel (.xlsx) and PDF documents to page images (PNG, JPEG, multi-page TIFF) and Word/Excel to PDF in C#: own layout engine for paragraphs, tables, headers and footers, footnotes, EMF/WMF pictures and Excel charts; pages are rendered with PDFium. No Microsoft Office, LibreOffice or Open XML SDK; Windows, Linux, macOS. |
GitHub repositories
This package is not used by any popular GitHub repositories.