Hi friends, I´m new using Graphics Mill, so sorry if my question is repeated.
I´m working with RGB images (TIFF, JPEG), sometimes big images. I would need add a black border (5mm. aprox) to my images. Does exist any method with Graphics Mill without using System.Drawing.Graphics in C# ??
Hi Fedor, it´s works fine for me. The only problems is that I loose the X and Y resolution. The output image is 72 dpi image while the input image is 400 dpi. I suppose writer will have any option to select the DPI desired.
Franchi_S5;32556 Hi Fedor, it´s works fine for me. The only problems is that I loose the X and Y resolution. The output image is 72 dpi image while the input image is 400 dpi. I suppose writer will have any option to select the DPI desired.
Thanks anyway, your help was useful for me.
Regards,
Hi again Fedor, thought I was easiest. I´m having problem with the output resolution. I´m reading a big TIFF (RGB 400 dpi) cropping, adding border and saving. But when I save the image it always have 72dpi. What should I do for keeping the original input resolution..?? I´m reading the image with TiffReader and saving with TiffWriter. I don´t know if working with so big images I should use another method.
show you my code (in this code the crop is not implemented):
private void button1_Click(object sender, EventArgs e)
{
var borderColor = RgbColor.Black;
int borderWidth = 20;
using (var reader = new TiffReader("E:/TEST/INTIFF/001.tif")) // big image at 400dpi
using (var generator = new ImageGenerator(reader.Width + borderWidth * 2, reader.Height + borderWidth * 2, reader.PixelFormat, borderColor))
using (var blender = new Blender())
using (var writer = new TiffWriter("E:/TEST/INTIFF/out.tif"))
{
var exif = reader.Exif;
writer.Exif = exif;
blender.TopImage = reader;
blender.X = borderWidth;
blender.Y = borderWidth;
Pipeline.Run(generator + blender + writer);
//(generator + blender + writer).Run();
}
}
Franchi_S5;32556 Hi Fedor, it´s works fine for me. The only problems is that I loose the X and Y resolution. The output image is 72 dpi image while the input image is 400 dpi. I suppose writer will have any option to select the DPI desired.
Thanks anyway, your help was useful for me.
Just copy DPI settings from the reader to the generator: