clone a magickimage to a bigger one
Posted: 2016-12-27T22:02:46-07:00
ello everyone.
I've searched a bit around the discussions\forums, but i couldn't find much information about how to achieve what i'm trying.
Also, i don't see much Magick.NET documentation - where i could obtain it
What i'm trying to do is:
I have an very large MagickImage object (9920 width , 7085 height). Its an tiff file i loaded and rotated.
I would like to create a new MagickImage object, larger (10594 width , 7387 height) and place the smaller MagickImage object in the middle of it. I'll be placing also into the upleft position, upright...but thats my next step. For now i just want to place it in the middle of the larger Magickimage , and add some borders. Also, i need this new MagickImage object(the larger one) to have transparent background.
What i tried , but couldn't get any further was:
And , this is my question. Any help will be greatly appreciated.
Thanks in advance.
Best Regards,
Pablo Costa.
I've searched a bit around the discussions\forums, but i couldn't find much information about how to achieve what i'm trying.
Also, i don't see much Magick.NET documentation - where i could obtain it
What i'm trying to do is:
I have an very large MagickImage object (9920 width , 7085 height). Its an tiff file i loaded and rotated.
I would like to create a new MagickImage object, larger (10594 width , 7387 height) and place the smaller MagickImage object in the middle of it. I'll be placing also into the upleft position, upright...but thats my next step. For now i just want to place it in the middle of the larger Magickimage , and add some borders. Also, i need this new MagickImage object(the larger one) to have transparent background.
What i tried , but couldn't get any further was:
Code: Select all
agickReadSettings Settings = new MagickReadSettings();
Settings.Width = Convert.ToInt32(zoneAreaWidth_Pixels);
Settings.Height = Convert.ToInt32(zoneAreaHeight_Pixels);
using (MagickImage inkZoneImage = new MagickImage(loadedImage))
{
//How to use settings here ?
//How to position the loadedImage in the middle of inkZoneImage ?
inkZoneImage.Write(@"C:\DI_PLOT\whatever.png");
}
Thanks in advance.
Best Regards,
Pablo Costa.