2

I am using leadtools to get image from scanner driver, how can I save that image to disk (jpg or bmp or any format)?

I am using these dll files:

- Leadtools.dll
- Leadtools.Twain.dll
- Leadtools.Codecs.dll
- Leadtools.WinForms.dll
- Leadtools.WinForms.CommonDialogs.File.dll

thanks & regards

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Rabee Alrabee
  • 95
  • 1
  • 7

1 Answers1

2

If the image was acquired successfully from the scanner into a RasterImage object, you can use the Leadtools.Codecs.RasterCodecs.Save() method to save either to disk file or stream.

You will also need the appropriate codec assembly such as Leadtools.Codecs.Bmp.dll for BMP or Leadtools.Codecs.Cmp.dll for JPEG.

LEADTOOLS Support
  • 2,755
  • 1
  • 12
  • 12
  • thank you so much i used: RasterCodecs rc = new RasterCodecs(); rc.Save(image, path, RasterImageFormat.Jpeg, 1); but it appeared this message: feature not supported. – Rabee Alrabee Dec 31 '13 at 16:57
  • 2
    The last parameter in Save() cannot be 1 with JPEG, because it does not support 1-bit. For normal color JPEG, pass 24. – LEADTOOLS Support Jan 02 '14 at 22:06