Hi, I need to change the TIFF file resolution and compress. The reason was the customer had scanned the files and the size if it in database is big. Can you please provide me a way to do that. I tried the below but not working as expected and causing AV error
for i := 0 to imgScanFile.MIO.ParamsCount do begin //imgScanFile.MIO.TwainParams.XResolution.CurrentValue := 200; //imgScanFile.MIO.TwainParams.YResolution.CurrentValue := 200; //imgScanFile.MIO.Acquire; imgScanFile.MIO.Params[i].DpiX := 200; imgScanFile.MIO.Params[i].DpiY := 200; end; end; imgScanFile.MIO.SaveToFileTIFF(imgScanFile.MIO.ExecuteSaveDialog);
The DPI settings of an image are simply an instruction on how to print/display an image. Setting them won't actually change the image, so you also need to call for each image in the MIO: