Home › Forums › TWAIN Classic › How to set ICAP_XSCALING and ICAP_YSCALING
- This topic has 1 reply, 2 voices, and was last updated 15 years, 1 month ago by gabe.
- AuthorPosts
Hello,
I’m new to twain and I’m finding difficulties in setting the ICAP_XSCALING and ICAP_YSCALING capabilities. The code is:
========
TW_CAPABILITY cap;
TW_INT16 rc= TWRC_FAILURE;
pTW_ONEVALUE pv;cap.Cap = scalCap; // capability id
cap.ConType = TWON_ONEVALUE; // container type
cap.hContainer = GlobalAlloc(GHND, sizeof(TW_ONEVALUE));pv = (pTW_ONEVALUE)GlobalLock(cap.hContainer);
pv->ItemType = TWTY_FIX32;
pv->Item = 1.5;
GlobalUnlock(cap.hContainer);rc = (*pDSM_Entry)(&AppId,
&SourceId,
DG_CONTROL,
DAT_CAPABILITY,
MSG_SET,
(TW_MEMREF)&cap);GlobalFree(cap.hContainer);
return rc;
==========This is a function that is being called at stage four, but the image is still being acquired without being rescaled. What am I doing wrong?
Thanks in advance,
Leonardo V. Ferreira
what rc is being returned?
.
- AuthorPosts