I have an old legacy document storage and retrieval program that enough people are using that I can't change over to multi-page TIFF files. I'm letting them scan a page or multiple pages of b&w, gray or color and saving them individually to disk with the most optimal compressions possible for b&w, gray and color. Hopefully 1 bit, 4 bit and 8 bit.
I just loaded a 35k sized file in as a test and it saved to 11 meg.
I have the images loaded into an ImageEnMView component, I then loop through the image count and do:
ImageEnMView1.CopyToIEBitmap(index, ImageEnIO1.IEBitmap);
then (from the following code you can probably tell that it has been 6 or 7 years since I worked with this sort of thing)
if frmMainForm.sSaveResolution = 'BW' then
begin
ImageEnIO1.Params.TIFF_Compression := ioTIFF_G4FAX;
ImageEnIO1.SaveToFileTIFF('c:\PHnd8\Data\bwimage.jpg');
end;
if frmMainForm.sSaveResolution = 'GR' then
begin
ImageEnIO1.Params.JPEG_ColorSpace := ioJPEG_GRAYLEV;
ImageEnIO1.Params.JPEG_Quality:=75;
ImageEnIO1.Params.JPEG_Progressive:=True;
ImageEnIO1.SaveToFileJpeg('c:\PHnd8\Data\grimage.jpg');
end;
if frmMainForm.sSaveResolution = 'CL' then
begin
ImageEnIO1.Params.JPEG_ColorSpace := ioJPEG_YCbCr;
ImageEnIO1.Params.JPEG_Quality:=75;
ImageEnIO1.Params.JPEG_Progressive:=True;
ImageEnIO1.SaveToFileJpeg('c:\PHnd8\Data\climage.jpg');
end;
I just need the 1 bit images in individual nicely compressed tif files, and the gray and color individually in jpg files (hopefully with the gray down to 4 bit or something like that).
Actually, the last time I seriously worked on getting image files nicely compressed was in 1998. Seems a bit more complex now.
Sounds easy enough but everything I see on the forum is a LOT more complex than I ever dealt with.