The leading provider of version control solution and TWAIN SDK

Error message: Only 24-bit true color bmp and 8-bit gray-scaled image are supported for JPEG compression

Symptom:

When you save or upload a image in buffer as a JPEG file, you may receive the following error message:



Cause:

You are saving a Black&White image as a JPEG file. JPEG standard defines that only 256 gray-scaled image and 24 bit RGB image can be compressed as JPEG format.

Resolution:

Please make sure the pixel type of the image in buffer is Gray or RGB. You can set the value of pixel type by using the PixelType property.

Code:

function btnScan_onclick()
{
   frmScan.DynamicWebTwain1.SelectSource();
   frmScan.DynamicWebTwain1.OpenSource(); 
   frmScan.DynamicWebTwain1.PixelType = 2; //RGB
   
   frmScan.DynamicWebTwain1.AcquireImage();
}

Reference:

PixelType  HTTPUploadThroughPost  SaveAsJPEG




Article Details

Last Updated
7th o November, 2008

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Visitor Comments

No visitor comments posted. Post a comment

Post a comment

To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
* Enter the code below:
 

Continue