Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, March 20, 2015 5:16:10 AM(UTC)

mesa  
mesa

Groups: Registered
Posts: 23


I'm using acquirefast with c# in version 19. How do I scan to a lossless jpeg. I do not see a way to set the CodecsJpegSaveOptions.QualityFactor to 0.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, March 22, 2015 9:46:23 PM(UTC)
Faris Shahin

Groups: Registered, Tech Support
Posts: 26


mesa,

If you want to use the Twain driver's own compression, I don't think you'll find a driver that supports lossless JPEG because it's not a common format.

However, our own image compression support lossless JPEG among countless other image types.
If you wish to save this format, you can use the Acquire() method and handle the AcquirePage event. From the event, you can set the quality factor of the JPEG image to 0 by using the following line:
_codecs.Options.Jpeg.Save.QualityFactor = 0;

Important notes:
1- The _codecs is a variable of type Leadtools.Codecs.RasterCodecs.
2- This format (Lossless JPEG) is not supported by some common viewers, so verify which viewer is going to be used to display it before you decide to use it.

Faris Shahin
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Monday, March 23, 2015 4:17:31 AM(UTC)

mesa  
mesa

Groups: Registered
Posts: 23


So if I'm understanding right, the only way to control the different possible jpeg and png compression levels when saving a scanned image is to use Acquire, because these settings are not supported by AcquireFast.

This seems to be a significant oversight in the implementation of AcquireFast. Is there any way to submit this as a request.
 
#4 Posted : Monday, March 23, 2015 4:58:52 AM(UTC)

mesa  
mesa

Groups: Registered
Posts: 23


Another question, what is the level of jpeg compression used when saving an image using AcquireFast? What is the level of png compression used when saving an image using AcquireFast?
 
#5 Posted : Tuesday, March 24, 2015 5:57:45 AM(UTC)
Faris Shahin

Groups: Registered, Tech Support
Posts: 26


mesa,

With AcquireFast (our Fast Twain features), the compression is actually performed by the Twain device's driver (data source), so the compression will depend on the scanner and not our toolkit. That's how fast Twain achieves maximum speed when you have a high-performance scanner.

About determining the level of compression, some scanners have a capability called ICAP_JPEGQUALITY. The capability can be used to get the level of compression and set it if it's supported by the scanner. For the PNG format, I'm afraid that I didn't find anything similar to JPEG. If the scanner supports more than one type of compression, use the ICAP_COMPRESSION capability which can be used to determine the type of required compression.

If your scanner does not support these capbalities, you can have control over the compression type and target format of the image using software (Acquire() method and codecs.Save() method). If you have a high-spec computer, you might even get speeds similar to Fast Twain because both our JPEG and PNG compressors are optimized.
Faris Shahin
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.058 seconds.