.NET Image Library version 2.0.6 released

September 08, 2016 | Posted by: Fredrik | Tags: Image Library, Open source

Store original or set new resolution (DPI)

Original resolution is stored when loading an image, but in order to save the resolution with the image the saveResolution parameter in the save function needs to be set to true. If not set or set to false the image will be saved with screen resolution (96 DPI).

    var image = new KalikoImage("image.jpg");
    image.SaveJpg("image-keep-dpi.jpg", 90, true);

It's also possible to get or set the current resolution by using the HorizontalResolution and VerticalResolution properties.

    var image = new KalikoImage("image.jpg");
    image.VerticalResolution = 300;
    image.HorizontalResolution = 300;
    image.SaveJpg("image-300-dpi.jpg", 90, true);

RotateFlip method

Ability to rotate and flip image added:

    var image = new KalikoImage("image.jpg");
    image.RotateFlip(RotateFlipType.Rotate90FlipNone);

Access to bitmap data

It's now possible to access the underlaying Bitmap object directly by calling GetAsBitmap().

    var bmp = image.GetAsBitmap();

Comments

comments powered by Disqus