savagenoob Posted January 5, 2009 Share Posted January 5, 2009 I acquired an ActiveX control to control twain (scanner) devices. I got it to acquire the images from the scanner, but dont know how to pass that image on to store. I have a process in place up upload and save files via PHP/MySql but this is a different process. Here is the code I have so far: <HTML> <HEAD> <TITLE>Set Pixel Type and Bit-Depth JavaScript Sample</TITLE> <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript> <!-- function WebTwain1_OnPostTransfer() { frmSample.WebTwain1.CloseSource(); } function btnAcquire_onclick() { frmSample.WebTwain1.SelectSource(); frmSample.WebTwain1.OpenSource(); switch (frmSample.sltColor.value){ case "1": intPixelType = 0; //Black and White intColorDepth = 1; //1 bit break; case "2": intPixelType = 1; //gray intColorDepth = 8; //8 bit break; case "3": intPixelType = 2; //color intColorDepth = 24; //24 bit break; } frmSample.WebTwain1.PixelType= intPixelType; //Set ICAP_PIXELTYPE frmSample.WebTwain1.BipDepth = intColorDepth; //Set ICAP_BITDEPTH //ready to acquire image frmSample.WebTwain1.IfShowUI = false; frmSample.WebTwain1.EnableSource(); } //--> </SCRIPT> <SCRIPT LANGUAGE=javascript FOR=WebTwain1 EVENT=OnPostTransfer> <!-- WebTwain1_OnPostTransfer() //--> </SCRIPT> </HEAD> <BODY> <OBJECT CLASSID = "clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT> <PARAM NAME="LPKPath" VALUE="DynamicWebTwain.lpk"> </OBJECT> <FORM id = frmSample> <BR> <object classid="clsid:D043D337-61FF-4BC4-807B-B3551BDD788B" width="204" height="219" id="WebTwain1"> <param name="_cx" value="370"> <param name="_cy" value="370"> <param name="JpgQuality" value="80"> <param name="Manufacturer" value="DynamSoft Corporation"> <param name="ProductFamily" value="Dynamic Web TWAIN"> <param name="ProductName" value="Dynamic Web TWAIN"> <param name="VersionInfo" value="Dynamic Web TWAIN 2.0"> <param name="TransferMode" value="0"> <param name="BorderStyle" value="0"> <param name="FTPUserName" value> <param name="FTPPassword" value> <param name="FTPPort" value="21"> <param name="HTTPUserName" value> <param name="HTTPPassword" value> <param name="HTTPPort" value="80"> <param name="ProxyServer" value> </object> <br> Bit-Depth: <SELECT id = sltColor> <OPTION VALUE="1">1 Bit BW <OPTION VALUE="2">8 Bit Gray <OPTION VALUE="3" SELECTED>24 Bit Color</OPTION> </SELECT> <BR> <input id = btnAcquire type="button" value="Acquire" LANGUAGE=javascript onclick="return btnAcquire_onclick()"> </FORM> </BODY> </HTML> Now what??? Thanks for the help in advance... Link to comment https://forums.phpfreaks.com/topic/139497-php-and-activex-control/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.