Last active
February 15, 2017 00:50
-
-
Save bleroy/73369ffef1cc6327d01c548b92717faf to your computer and use it in GitHub Desktop.
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
using PhotoSauce.MagicScaler; | |
const int size = 150; | |
const int quality = 75; | |
var settings = new ProcessImageSettings() { | |
Width = size, | |
Height = size, | |
ResizeMode = CropScaleMode.Max, | |
SaveFormat = FileFormat.Jpeg, | |
JpegQuality = quality, | |
JpegSubsampleMode = ChromaSubsampleMode.Subsample420 | |
}; | |
using (var output = new FileStream(OutputPath(path, outputDirectory, MagicScaler), FileMode.Create)) | |
{ | |
MagicImageProcessor.ProcessImage(path, output, settings); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment