Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
507914d
commit 4f4c4f0
Showing
20 changed files
with
397 additions
and
366 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
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,34 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<Title>High-Quality, High-Performance Image Processing for .NET</Title> | ||
</PropertyGroup> | ||
|
||
<Choose> | ||
<When Condition="'$(MSBuildProjectName)'=='MagicScaler'"> | ||
<PropertyGroup> | ||
<Description>High-Performance image processing pipeline for .NET. Implements best-of-breed algorithms, linear light processing, and sharpening for the best image resizing quality available. Speed, efficiency, and image quality are unmatched by anything else on the .NET platform.</Description> | ||
<PackageTags>Image Resize Resample Process Crop Sharpen Rotate Flip WIC JPEG JPG PNG GIF TIFF</PackageTags> | ||
</PropertyGroup> | ||
</When> | ||
<When Condition="'$(MSBuildProjectName)'=='WebRSize'"> | ||
<PropertyGroup> | ||
<Description>Web extensions for the MagicScaler library, inlcluding an HTTP request intercept module for automatic image processing.</Description> | ||
<PackageTags>ASP.NET Web Handler Module VirtualPathProvider Image Resize Resample Process</PackageTags> | ||
</PropertyGroup> | ||
</When> | ||
<When Condition="'$(MSBuildProjectName)'=='NativeCodecs.Libheif'"> | ||
<PropertyGroup> | ||
<Description>HEIC codec plugin for the PhotoSauce.MagicScaler pipeline.</Description> | ||
<PackageTags>Image Decode HEIC HEIF</PackageTags> | ||
</PropertyGroup> | ||
</When> | ||
<When Condition="'$(MSBuildProjectName)'=='NativeCodecs.Libjxl'"> | ||
<PropertyGroup> | ||
<Description>JPEG XL codec plugin for the PhotoSauce.MagicScaler pipeline.</Description> | ||
<PackageTags>Image Decode Encode JPEG-XL JXL</PackageTags> | ||
</PropertyGroup> | ||
</When> | ||
</Choose> | ||
|
||
</Project> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
PhotoSauce.MagicScaler | ||
====================== | ||
|
||
MagicScaler is a high-performance image processing pipeline for .NET, focused on making complex imaging tasks simple. | ||
|
||
It implements best-of-breed algorithms, linear light processing, and sharpening for the best image resizing quality available. | ||
|
||
Speed and efficiency are unmatched by anything else on the .NET platform. | ||
|
||
Requirements | ||
------------ | ||
|
||
MagicScaler currently has full functionality only on Windows. Although MagicScaler is compatible with -- and optimized for -- .NET Core and .NET 5+, it requires the [Windows Imaging Component](https://docs.microsoft.com/en-us/windows/desktop/wic/-wic-about-windows-imaging-codec) for its image codec support. | ||
|
||
Work is in progress to reach full feature parity on Linux. | ||
|
||
Usage | ||
----- | ||
|
||
### Image Resizing | ||
|
||
```C# | ||
MagicImageProcessor.ProcessImage(@"\img\big.jpg", @"\img\small.jpg", new ProcessImageSettings { Width = 400 }); | ||
``` | ||
|
||
The above example will resize `big.jpg` to a width of 400 pixels and save the output to `small.jpg`. The height will be set automatically to preserve the correct aspect ratio. Default settings are optimized for a balance of speed and image quality. | ||
|
||
The MagicScaler pipleline is also customizable if you wish to use an alternate pixel source, capture the output pixels for additional processing, or add custom filtering. | ||
|
||
See the [full documentation](https://docs.photosauce.net) for more details. |
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,39 @@ | ||
PhotoSauce.ManagedCodecs.ImageSharp | ||
=================================== | ||
|
||
This MagicScaler plugin sample makes the [ImageSharp](https://github.com/SixLabors/ImageSharp) [TARGA](https://en.wikipedia.org/wiki/Truevision_TGA) codec available for decode and encode. | ||
|
||
This sample presents the minimum implementation required to decode and encode for a codec with no metadata support. | ||
|
||
Usage | ||
----- | ||
|
||
### Codec Registration | ||
|
||
To register the codec, call the `UseImageSharpTga` extension method from your `CodecManager.Configure` action at app startup. | ||
|
||
```C# | ||
using PhotoSauce.MagicScaler; | ||
using PhotoSauce.ManagedCodecs.ImageSharp; | ||
|
||
CodecManager.Configure(codecs => { | ||
codecs.UseImageSharpTga(); | ||
}); | ||
``` | ||
|
||
### Using the Codec | ||
|
||
Once registered, the codec will automatically detect and decode compatible images. | ||
|
||
To encode TGA images, the encoder MIME type can be set on `ProcessImageSettings`: | ||
|
||
```C# | ||
var settings = new ProcessImageSettings(); | ||
settings.TrySetEncoderFormat("image/tga") | ||
``` | ||
|
||
Or the encoder can be selected by file extension on overloads accepting file paths: | ||
|
||
```C# | ||
MagicImageProcessor.ProcessImage(@"\img\input.jpg", @"\img\output.tga", settings); | ||
``` |
Oops, something went wrong.