Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (MagickImage image = new MagickImage(ssimageBinary))
- {
- image.Density = new Density(sstargetDensity);
- MagickGeometry size = new MagickGeometry(sstargetWidth, sstargetHeight);
- // This will resize the image to a fixed size without maintaining the aspect ratio.
- // Normally an image will be resized to fit inside the specified size.
- size.IgnoreAspectRatio = ssKeepAspectRatio;
- image.Resize(size);
- MemoryStream mStream = new MemoryStream();
- // Save the result
- image.Write(mStream, MagickFormat.Png);
- ssnewImage = mStream.ToArray();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement