vaibhavs Posted May 18, 2007 Share Posted May 18, 2007 Hi, I am working on the Webcam snapshot AU3. I am able to capture the photo in bmp. Any way to convert it into JPG OR grab a picture in JPG format. As a temporary solution I have found this free command line converter which converts it "bmptojpg.exe". Please help!. Thank you. Vai Link to comment Share on other sites More sharing options...
SadBunny Posted May 18, 2007 Share Posted May 18, 2007 Hi,I am working on the Webcam snapshot AU3.I am able to capture the photo in bmp.Any way to convert it into JPG OR grab a picture in JPG format.As a temporary solution I have found this free command line converter which converts it "bmptojpg.exe".Please help!.Thank you.VaiI guess the temporary option is the best one you have. Short of writing your own jpg to bmp conversion utility, which you don't want to do in autoit because of speed. Still you would have to either use other people's routines (check for open source image converter programs like there are for Linux if you want to do that) or write your own conversion routines which is hard work that's also already been done.So if it's not your life mission to improve worldwide picture handling, I think you are way better off using something like your freeware app... Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
Gif Posted May 18, 2007 Share Posted May 18, 2007 call a .dll DllCall($dlldir & "\capture.dll", "int:cdecl", "capturewebcam", "str", $defaultdir & "\Full" & $pic & ".jpg", "int") Link to comment Share on other sites More sharing options...
Zedna Posted May 18, 2007 Share Posted May 18, 2007 (edited) I recommend external commandline tol too. For example IrfanView.Also Auto3Lib has capture functions also for JPEGs. Edited May 18, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
PaulIA Posted May 18, 2007 Share Posted May 18, 2007 I recommend external commandline tol too. For example IrfanView.Also Auto3Lib has capture functions also for JPEGs.It also can convert to/from BMP, GIF, JPG, PNG and TIF. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Zedna Posted May 18, 2007 Share Posted May 18, 2007 It also can convert to/from BMP, GIF, JPG, PNG and TIF.Great! Good to know about that. Really powerfull library Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
vaibhavs Posted May 19, 2007 Author Share Posted May 19, 2007 Thanks for all the inputs.To summarize, there are 3 options (a) Freeware tool (2) dll Call (3) AutoIT3 LibraryI would like to avoid (1) Freeware Tool. The idea is to avoid having to carry an additional file.Its best if 1 au3 file can handle it all.C4NM7: can you help me with your dll call.I am using this script: http://www.autoitscript.com/forum/index.ph...5&hl=webcam from rysiora.Can you suggest where should I insert the line suggested by you.I have installed the Library and will post the feedback on using the library.Thank you.Vai Link to comment Share on other sites More sharing options...
PaulIA Posted May 19, 2007 Share Posted May 19, 2007 Thanks for all the inputs. To summarize, there are 3 options (a) Freeware tool (2) dll Call (3) AutoIT3 Library I would like to avoid (1) Freeware Tool. The idea is to avoid having to carry an additional file. Its best if 1 au3 file can handle it all. C4NM7: can you help me with your dll call. I am using this script: http://www.autoitscript.com/forum/index.ph...5&hl=webcam from rysiora. Can you suggest where should I insert the line suggested by you. I have installed the Library and will post the feedback on using the library. Thank you. VaiHere's a little ditty that converts a BMP to JPG using Auto3Lib: #include <A3LGDIPlus.au3> Global $sImage, $hImage, $sCLSID ; Get BMP file to convert $sImage = InputBox("BMP to JPG", "Enter File Name:", "C:\Image.bmp", "", 200, 130) if @Error then Exit ; Initialize GDI+ library _GDI_StartUp() ; Load image $hImage = _GDI_LoadFromFile($sImage) ; Get JPEG encoder CLSID $sCLSID = _GDI_GetEncoderClsID("JPG") ; Save image as JPG _GDI_SaveToFile($hImage, "C:\Image.jpg", $sCLSID) ; Shut down GDI+ library _GDI_ShutDown() Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
vaibhavs Posted May 19, 2007 Author Share Posted May 19, 2007 Hi, Any idea from where can I get capture.dll ? Thx Vai Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now