I'm using Delphitwain (delphitwain.sourceforge.net) to add scan functionality to my app. Scanning is working fine and I can save bmp and jpeg files. Now I need to:

* save in 300dpi (the scanner is capable)
* save in TIFF format

After digging around, I found 2 tips:

<http://www.delphipraxis.net/132787-farbstich-nach-bitmap-operation.html>

<http://synopse.info/fossil/wiki?name=GDI%2B>

Here is my final code:

```
procedure TForm1.GoAcquireClick(Sender: TObject);
begin
  Counter := 0;
  Twain.SourceManagerLoaded := TRUE;
  Twain.LoadSourceManager;
  Twain.TransferMode := ttmMemory;

  with Twain.Source[ 0 ] do
  begin
    Loaded := TRUE;
    SetIXResolution(300);
    SetIYResolution(300);
    SetIBitDepth(1);
    EnableSource(true, true);
    while Enabled do Application.ProcessMessages;
  end;
end;

procedure TForm1.TwainTwainAcquire(Sender: TObject; const Index: Integer;
   Image: TBitmap; var Cancel: Boolean);
var
   TiffHolder: TSynPicture;
begin
  Inc( Counter );
  Current := Counter;
  ImageHolder.Picture.Assign( Image );
  ImageHolder.Picture.Bitmap.Monochrome := true;
  ImageHolder.Picture.Bitmap.Pixelformat := pf1Bit;

  SynGDIPlus.SaveAs(ImageHolder.Picture, format('c:\temp\teste%d.tif',[ Counter ]), gptTIF );
end;

```

Result: the image still is 96dpi and were saved as BMP (even with TIF extension).

What am I missing?