Cyber Posted August 30, 2007 Share Posted August 30, 2007 Hi! Can you help me? i need a function for convert BMP file in Jpeg Thanks Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
gadzail Posted August 30, 2007 Share Posted August 30, 2007 Hi!Can you help me? i need a function for convert BMP file in JpegThanks I think you can use Irfanview (http://www.irfanview.com/) with the command lineoption "convert". Link to comment Share on other sites More sharing options...
Zedna Posted August 30, 2007 Share Posted August 30, 2007 (edited) IrfanView is very good and simple solution.Use RunWait() to run it.Or if you don't want external tools then look at Auto3Lib.There are examples for such conversions with GDI+ Edited August 30, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
gadzail Posted August 30, 2007 Share Posted August 30, 2007 IrfanView is very good and simple solution.Use RunWait() to run it.Or if you don't want external tools then look at Auto3Lib.There are examples for such conversions with GDI+ I found also ImageMagick.I don't know how to use it but it is consider very powerful..http://www.imagemagick.org/Usage/ Link to comment Share on other sites More sharing options...
rone Posted August 31, 2007 Share Posted August 31, 2007 I found also ImageMagick.I don't know how to use it but it is consider very powerful..http://www.imagemagick.org/Usage/ImageMagick would probably be a good choice. Its "convert" function is a DOS program that can convert just about any image format to another. There are APIs for several programming languages, including C and Java. And, it is well documented. I used something like the following AutoIt syntax to crop and resize. A conversion should be similar. The input file name is on the left, the output file name is on the right and the operation is in the middle.$strBase = 'C:\Documents and Settings\User\Desktop'$strImageIn = 'Input.gif'$strImageOut = 'Output.gif'$strCmd = @ComSpec & ' /c ' & 'convert ' & $strImageIn & ' -crop 445x405!+175+45 -resize 320x240! ' & $strImageOut$handleRun = RunWait( $strCmd, $strBase, @SW_HIDE ) Link to comment Share on other sites More sharing options...
martin Posted August 31, 2007 Share Posted August 31, 2007 ImageMagick would probably be a good choice. Its "convert" function is a DOS program that can convert just about any image format to another. There are APIs for several programming languages, including C and Java. And, it is well documented. I used something like the following AutoIt syntax to crop and resize. A conversion should be similar. The input file name is on the left, the output file name is on the right and the operation is in the middle.$strBase = 'C:\Documents and Settings\User\Desktop'$strImageIn = 'Input.gif'$strImageOut = 'Output.gif'$strCmd = @ComSpec & ' /c ' & 'convert ' & $strImageIn & ' -crop 445x405!+175+45 -resize 320x240! ' & $strImageOut$handleRun = RunWait( $strCmd, $strBase, @SW_HIDE )I don't know Imagemagic but it looks like 'imageMagic' should appear in the RunWait shouldn't it? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
smashly Posted August 31, 2007 Share Posted August 31, 2007 (edited) No third party exe needed.. A3Lib.. Crude no error checking example, just to show.. #include <A3LGDIPlus.au3> Global $hImage, $sCLSID _GDIP_StartUp() $hImage = _GDIP_ImageLoadFromFile(@ScriptDir & "\your.bmp") $sCLSID = _GDIP_EncodersGetCLSID("JPG") _GDIP_ImageSaveToFileEx($hImage, @ScriptDir & "\your.jpg", $sCLSID) _GDIP_ShutDown() Cheers Edited August 31, 2007 by smashly Link to comment Share on other sites More sharing options...
gadzail Posted August 31, 2007 Share Posted August 31, 2007 No third party exe needed.. A3Lib.. Crude no error checking example, just to show.. #include <A3LGDIPlus.au3> Global $hImage, $sCLSID _GDIP_StartUp() $hImage = _GDIP_ImageLoadFromFile(@ScriptDir & "\your.bmp") $sCLSID = _GDIP_EncodersGetCLSID("JPG") _GDIP_ImageSaveToFileEx($hImage, @ScriptDir & "\your.jpg", $sCLSID) _GDIP_ShutDown() Cheers wow.. Link to comment Share on other sites More sharing options...
Cyber Posted August 31, 2007 Author Share Posted August 31, 2007 (edited) No third party exe needed.. A3Lib.. Crude no error checking example, just to show.. #include <A3LGDIPlus.au3> Global $hImage, $sCLSID _GDIP_StartUp() $hImage = _GDIP_ImageLoadFromFile(@ScriptDir & "\your.bmp") $sCLSID = _GDIP_EncodersGetCLSID("JPG") _GDIP_ImageSaveToFileEx($hImage, @ScriptDir & "\your.jpg", $sCLSID) _GDIP_ShutDown() Cheers Thanks! But i cant install autoit3lib... the error installation message: Auto3Lib require at last version 3.2.4.9 of AutoIt. Yout version is 3.2.6.0 ..... can you please attach (at this post) the A3LGDIPlus.au3 file please? thanks! Edited August 31, 2007 by Cyber Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
ChrisL Posted August 31, 2007 Share Posted August 31, 2007 Thanks!But i cant install autoit3lib...the error installation message:Auto3Lib require at last version 3.2.4.9 of AutoIt.Yout version is 3.2.6.0.....can you please attach (at this post) the A3LGDIPlus.au3 file please? thanks!I don't think that PaulIA will like you posting parts of the library here.Try this temporary fix http://www.autoitscript.com/forum/index.ph...mp;#entry393902 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Cyber Posted August 31, 2007 Author Share Posted August 31, 2007 Now work! Thanks Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
rone Posted August 31, 2007 Share Posted August 31, 2007 I don't know Imagemagic but it looks like 'imageMagic' should appear in the RunWait shouldn't it?The ImageMagick image conversion utility is called "convert.exe". ImageMagick includes a library of command-line utilities:- animate: animates an image sequence on any X server.- compare: mathematically and visually annotate the difference between an image and its reconstruction.- composite: overlaps one image over another.- conjure: interprets and executes scripts written in the Magick Scripting Language (MSL).- convert: convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.- display: displays an image or image sequence on any X server.- identify: describes the format and characteristics of one or more image files.- import: saves any visible window on an X server and outputs it as an image file.- mogrify: resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.- montage: create a composite image by combining several separate images.- stream: streams pixels to a storage formatSee: http://www.imagemagick.org/script/command-line-tools.php 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