UtilImageCompressImage(String, String, ImageFormat, Int32) Method

Compresses a image file to the specified filesize and saves the compressed image to disk.

Definition

Namespace: DevCase.Core.Media.Graphics
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void CompressImage(
	string srcFilepath,
	string dstFilepath,
	ImageFormat newImageFormat,
	int newFileSize
)

Parameters

srcFilepath  String
The source image filepath.
dstFilepath  String
The target image filepath.
newImageFormat  ImageFormat
The target image format.
newFileSize  Int32
The target filesize, in bytes.

Example

This is a code example that compress all JPG files in the specified directory.
C#
No code example is currently available or this language may not be supported.

See Also