in

Archived Data Techniques Forums

wPixTypes = TWAIN_PALETTE - ignored?

Last post 04-20-2007 10:30 AM by support. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-17-2007 10:59 AM

    wPixTypes = TWAIN_PALETTE - ignored?

    Calling:

    ScanLowAcquirePages( hJob, -1, TWAIN_PALETTE, TWAIN_USEADF | TWAIN_SHOWUI, NULL );

    Returns a log showing that the image was scanned at 24bit.  This causes GIF to fail in color mode.

     Log:

    =====================================================
    == Last Modified on 10/24/05 4:00 by EJW           ==
    == Extra handle and pointer checks                 ==
    =====================================================
    Log Opened:
    State: 2 Twain Triplet: DG_CONTROL,  DAT_PARENT,  MSG_OPENDSM-  Parent Data window handle: 114487580 [TWRC_SUCCESS]
    State: 3 Twain Triplet: DG_CONTROL,  DAT_IDENTITY,  MSG_OPENDS- 
    Id: 95
    Protocol: 1.9
    Manufacturer: Visioneer Inc
    Product Family: OneTouch Scanner {9650}
    Product Name: Visioneer 9650
    Version: 4.0
    Language: 13
    Country: 1
    Info: OneTouch 4.0
     [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  CAP_XFERCOUNT TWON_ONEVALUE -  TWTY_INT16  255  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  ICAP_XFERMECH TWON_ONEVALUE -  TWTY_UINT16  0  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  ICAP_UNITS TWON_ONEVALUE -  TWTY_UINT16  0  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  ICAP_BRIGHTNESS TWON_ONEVALUE -  TWTY_FIX32  0.0  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  ICAP_CONTRAST TWON_ONEVALUE -  TWTY_FIX32  0.0  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  CAP_FEEDERENABLED TWON_ONEVALUE -  TWTY_BOOL  TRUE  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  CAP_AUTOFEED TWON_ONEVALUE -  TWTY_BOOL  TRUE  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  CAP_DUPLEXENABLED TWON_ONEVALUE -  TWTY_BOOL  FALSE  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  ICAP_PIXELTYPE TWON_ONEVALUE -  TWTY_UINT16  3  [TWRC_FAILURE]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_STATUS,  MSG_GET-  Condition Code: TWCC_BADVALUE- Data parameter out of range  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_CAPABILITY,  MSG_SET-  ICAP_PIXELTYPE TWON_ONEVALUE -  TWTY_UINT16  2  [TWRC_SUCCESS]
    State: 4 Twain Triplet: DG_CONTROL,  DAT_USERINTERFACE,  MSG_ENABLEDS-   UserInterface ShowUI: TRUE, hParent:593662
     [TWRC_SUCCESS]
    ********.**********************.....***************************.*......****...*****....***....*.........***********..*.****.*******...*..****.*****.**.*...........****.*****...**.....*.........****.*****..**..*...************...*****..********..*********..***..***********...*..***********.*.****.********...*********.***.*********.**.***...*.*****........................***********.**********.****.***********.**.***********.*****.********.*********.***.***********.*..***********...*.............****.......*****...**.....*...*********.**...*....*********.**........**.........****.....*****.**...*.........****..*****....**..*...****.*******.....***..*...************...*****.***..*********.***.*..***********.************************************************************************************..***.***********.*****.********.**********.***.***********.*.************.*****.********.*********.***.***********.*.***********...*****.********.***********.*.************.*****.********.*********.****.***********.*.***********.*****.********.*********.***...*.*.***********..**.***..********..**********..***..***********.*.***********.******.********.*********.....**....*.........****.*.****..**...*.....***********...*****.....*****.**..*....*******.********************.**.*******.********.***********.***.****************.*****.************.*.**************.*****.*.*.....********.****.*****.***.....****.*.****.**........*...************.*********.***...****.*****..**....*..........****..*****..**......*......****....*****..***....*.....*********..***..***********...*..****.*******...*...*.***...*****..**....*..........****..*****....**....*.......****..*****.**....*****.*******.*.*********.**.*......****..*****..**.....**.....****..*****..**....*.....****.*******.*..*********.**.*.....****....*****..**......*.......****.*****..**...*...*********..**.*...***********..*..****.*******.*...****...*****...**...*.........*..****.*******..*..****.*******..*..****.*****.**.*..****.*****.**.*...*********.**.*.****.*******.*..****.**.*****.**.*.****.*******.*..*********.**.*.*****..********.*.***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************.*****...***.......*......****..*****.**..*****..*****....**...*........*********....**...*..***********..*....****..*****.**...*.....****.*****.***.*********.**.*.***********.*.***********.******.********************************************************************************.******************************************************************************************************************.********************************************************************************************************************.**************************************************************************************************************.*****************************************.******...*******************..
    State: 5 Twain Triplet: DG_CONTROL,  DAT_EVENT,  MSG_PROCESSEVENT- MSG: MSG_XFERREADY  [TWRC_DSEVENT]
    Getting ready to access BITMAPINFO HANDLE \ Succesfully accessed BITMAPINFO HANDLE.
    State: 6 Twain Triplet: DG_IMAGE,  DAT_IMAGENATIVEXFER,  MSG_GET- 
    BITMAPINFOHEADER:
    Size: 40
    Width: 1700
    Height: 2200
    Planes: 1
    BitCount: 24
    Compression: 0
    SizeImage: 11220000
    XPels: 7875
    YPels: 7875
    ClrUsed: 0
    ClrImportant: 0
     [TWRC_XFERDONE]

  • 04-17-2007 8:33 PM In reply to

    Re: wPixTypes = TWAIN_PALETTE - ignored?

    Hi,

    The GIF format doesnt support 24 bit image data, you'll need to reduce the bitdepth to 8 bits prior to saving the image as a GIF file.
     

    Sean
    Data Techniques Online Support
  • 04-18-2007 7:18 AM In reply to

    Re: wPixTypes = TWAIN_PALETTE - ignored?

    Sean,

    I understand that.  But isn't that the point of TWAIN_PALETTE ?  The documentation indicates that it specifies 4 or 8 bit color.  Since that is the only option I am using, why is the data returning in 24 bit?

     Todd

  • 04-20-2007 10:30 AM In reply to

    Re: wPixTypes = TWAIN_PALETTE - ignored?

    Hi,

     The scanner can ignore that flag so you really need to look at the returned bitmap and based on that call ReduceColors if needed.


     

    Sean
    Data Techniques Online Support
Page 1 of 1 (4 items)
Copyright 2009 Data Techniques, Inc. All Rights Reserved.