thanks,
But now I have another question: the black/white picture has a little sloped, while the RGB one is normal! What's going on?
my codes:
procedure TForm1.ImageEnMIO1AcquireBitmap(Sender: TObject;
ABitmap: TIEBitmap; var Handled: Boolean);
var
idx:integer;
filename:string;
io:TImageEnIO;
begin
io:=TImageEnIO.CreateFromBitmap(ABitmap);
idx := ImageEnMView1.AppendImage();
filename := 'c:\twain\page_'+format('%.8d',[idx+1])+'.tif';
try
if ABitmap.BitCount=1 then
begin
io.Params.BitsPerSample:=1;
io.Params.SamplesPerPixel:=1;
io.Params.TIFF_Compression:=ioTIFF_CCITT1D;
end
else
io.Params.TIFF_Compression:=ioTIFF_JPEG;
io.SaveToFileTIFF(filename);
ImageEnMView1.ImageFileName[idx] := filename;
Handled := true;
finally
io.Free;
end;
the red ellipse is the sloped part of the black/white picture:

19.75 KB

33.01 KB