I use Bit Miracle's LibTiff.Net to convert scanned image to tiff file, but I want to save images with 200dpi even that scanned with 300 dpi I found this in the Bit Miracle site sample
tif.SetField(TiffTag.XRESOLUTION, img.HorizontalResolution);
tif.SetField(TiffTag.YRESOLUTION, img.VerticalResolution);
but I make this change to set resolution always 200dpi :
tif.SetField(TiffTag.XRESOLUTION, 200);
tif.SetField(TiffTag.YRESOLUTION, 200);
in the tif file property it say 200 dpi but the file size don't change 163 Ko before and after the change,
I make a search for all resolution used in the code, and I make it 200 but always the same file size.
if I change the value in the SetField
I got it in the file property but not in the rezolution of the image (same size always for all resolution test)
How I can change the resolution of the destination tif ?
LibTiff.Net is a codec library. It's not designed to resample images.
Changing dpi value will only affect print size of the image, not the image data. You should resample data yourselves.