package uk.co.mmscomputing.device.twain; import java.util.Enumeration; import java.util.Vector; public class TwainExtImageInfo implements TwainConstants{ /* typedef struct { TW_UINT16 InfoID; TW_UINT16 ItemType; TW_UINT16 NumItems; TW_UINT16 CondCode; TW_UINT32 Item; }TW_INFO, FAR* pTW_INFO; typedef struct { TW_UINT32 NumInfos; TW_INFO Info[1]; }TW_EXTIMAGEINFO, FAR* pTW_EXTIMAGEINFO; */ TwainSource source; byte[] buf; int[] attributes; // list of extended image info attributes Vector extInfos; public TwainExtImageInfo(TwainSource source,int tweiValue){ this.source=source; attributes=new int[1]; attributes[0]=tweiValue; initBuf(); } public TwainExtImageInfo(TwainSource source,int[] tweiValues){ this.source=source; attributes=tweiValues; initBuf(); } private void initBuf(){ int len = attributes.length; buf=new byte[4+len*12]; jtwain.setINT32(buf,0,attributes.length); for (int i=0,off=4;i