ptrex Posted January 14, 2008 Author Share Posted January 14, 2008 @oldschool Try to run to commands like this from the CONVERT.EXE : ShellExecute("convert.exe", "cyclops.png \( +clone -fx 'p{0,0}' \) \ -compose Difference -composite \ " _ "-modulate 100,0 +matte difference.png", "C:\Program Files\ImageMagick-6.3.5-Q16\") If that works you ccan start bringing over the syntax to the COM syntax. This is the only way you can start debugging the syntax. regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Oldschool Posted January 14, 2008 Share Posted January 14, 2008 @oldschool Try to run to commands like this from the CONVERT.EXE : ShellExecute("convert.exe", "cyclops.png \( +clone -fx 'p{0,0}' \) \ -compose Difference -composite \ " _ "-modulate 100,0 +matte difference.png", "C:\Program Files\ImageMagick-6.3.5-Q16\")oÝ÷ Øí«p¢¹,Êq©ìµªín¸§)à¢÷«¶¬Ê{ZÆÚ-à2̧µ¬ªê-x.zËq©÷öׯzx¶+p¢¹""¶.´#®(!¶z0jëh×6ShellExecute("convert.exe", "C:\Pics\Testing\cyclops.png \( +clone -fx 'p{0,0}' \) \ -compose Difference -composite \ -modulate 100,0 +matte C:\Pics\Testing\difference.png", "C:\Program Files\ImageMagick-6.3.7-Q8\") This sample executes without error, but nothing happens...I get no resulting image. Ultimately I'm trying to separate color images from their backgrounds. I'm also trying to do this in parallel using the A3LGDIPlus. I've seen people separate foreground from background images using a channel separation while holding a bitmap in memory, sort of how they do it here http://www.autoitscript.com/forum/index.ph...52178&st=15 Any ideas would be much appreciated. Link to comment Share on other sites More sharing options...
taz742 Posted April 13, 2008 Share Posted April 13, 2008 (edited) Here the manifest for RegFreeCOM use of ImageMagickObject.dllCopy/Past this in NotePad<?xml version="1.0" encoding="utf-8"?> <assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <file name="ImageMagickObject.dll"> <typelib tlbid="{9AA0FC6A-63C7-3632-BD6B-7CAF646E51A0}" version="1.0" helpdir="" resourceid="0" flags="" /> <comClass clsid="{5630BE5A-3F5F-4BCA-A511-AD6A6386CAC1}" threadingModel="both" tlbid="{9AA0FC6A-63C7-3632-BD6B-7CAF646E51A0}" progid="ImageMagickObject.MagickImage.1" description="ImageMagick Class" /> </file> </assembly>Then Save it to "your_AutoIt_compiled_script_name.exe.manifest" with "Filetype=All" and "Codage=UTF-8"Or juste Download this Winrared one and rename it to "your_AutoIt_compiled_script_name.exe.manifest" :ImageMagickObject.dll.exe.manifest.rarEnjoy Edited April 13, 2008 by taz742 Link to comment Share on other sites More sharing options...
ptrex Posted April 13, 2008 Author Share Posted April 13, 2008 @taz742 Good to see that you got inspired by the RegFreeCom features!! regards, ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
therms Posted May 8, 2008 Share Posted May 8, 2008 (edited) Ok, I'm trying to get this thing working but I seem unable to...Here's my code:$img = ObjCreate("ImageMagickObject.MagickImage.1") $GetTrimInfo = $img.Convert("IMG.jpg", "-format", "%wx%h%O", "-virtual-pixel", "edge", "-blur", "0x10", "-fuzz", "15%", "-trim", "info:") MsgBox(0, "triminfo", $GetTrimInfo)When I run this, I'm pretty sure it's actually doing something because that convert command, when run from the command line, takes 10-20 seconds of full CPU, and this script does the same. Running it from the command line returns this:C:\Users\Therms\Desktop>convert IMG.jpg -format %wx%h%O -virtual-pixel edge -blur 0x10 -fuzz 15% -trim info: 387x1081+444+7Running the script ends up with:After I added the errorhandling from the original post I get this (which doesn't seem too helpful):Any ideas?BTW, I'm new to AutoIt and these forums... Edited May 8, 2008 by therms Link to comment Share on other sites More sharing options...
therms Posted May 8, 2008 Share Posted May 8, 2008 Ok, a bit more info. I replaced my convert line with the one from the original post. $img = ObjCreate("ImageMagickObject.MagickImage.1") $ret = $img.Convert("IMG.jpg", _ "-resize", "320x200", _ "-sepia-tone", "70%", _ "-format", "gif", _ "IMG_new.jpg") I still get the same COM error, but my suspicions above are confirmed. It IS actually doing the work as IMG_new.jpg is created. Normally, I'd just create a dummy error function and forget about it, but I really need to get the info returned by the convert command in my previous post and I can't seem to do that. Link to comment Share on other sites More sharing options...
Champak Posted June 4, 2008 Share Posted June 4, 2008 I can't Get this to work/register on a different computer. I'm using? $ImgMagick = "C:\WINDOWS\system32\ImageMagickObject.dll" If Not (FileExists($ImgMagick)) Then FileInstall("C:\Additions\Misc\GPS ImageMagick-6.4.1-Q16\ImageMagickObject.dll", $ImgMagick, 1) EndIf RunWait('Regsvr32 /s "' & $ImgMagick & '"') This is working fine with two other com/dll objects. So is there an issue with ImgMagick? Are there more dlls I need to include from the installation package? Link to comment Share on other sites More sharing options...
Flop Posted October 25, 2008 Share Posted October 25, 2008 Hi everyone, This post is dead ? :-) i don't work imageMagick with autoit, what's the final code use ? thanks and sorry for my language ! Link to comment Share on other sites More sharing options...
taz742 Posted December 17, 2008 Share Posted December 17, 2008 The last working imagemagickobject.dll version is the static v6.4.1-2:you could get it here:ImageMagick-6.4.1-2-Q8-windows-static.exeImageMagick-6.4.1-2-Q16-windows-static.exeAfter this version imagemagickobject.dll seems to be not fully static Link to comment Share on other sites More sharing options...
Sunaj Posted April 5, 2009 Share Posted April 5, 2009 Just dusting off this oldie but definitely goodie thread, noting that 'ImageMagick-6.4.1-2-Q8-windows-static.exe' that was recommended by taz742 is not working right with COM objects in AutoIt. Thing is, 6.4.1-2-Q8 works to some extend (i.e. you can get it to convert a image), but bugs out continually with the default errors messages so hard to use it in larger script/production..etc. So. Browsing a bit about on the URL provided by taz742 (thanks dude!) I picked a random, older, version ImageMagick-6.3.9-0-Q8-windows-static.exe and then everything worked brilliantly (say for example the script provided by ptrex in the header posting on this subject is then working 100% right). Remember to check "Install ImageMagickObject OLE COntrol for VBscript [...]" when installing unless you want to do this manually on cmd-line with: "regsvr32 /c /s ImageMagickObject.dll" and to uninstall "regsvr32 /u /s ImageMagickObject.dll" Thanks to everyone having contributed to this subject The last working imagemagickobject.dll version is the static v6.4.1-2: you could get it here: ImageMagick-6.4.1-2-Q8-windows-static.exe ImageMagick-6.4.1-2-Q16-windows-static.exe After this version imagemagickobject.dll seems to be not fully static [list=1][*]Generic way to detect full path to default browser, List/ListView Events Using GuiRegisterMsg (detect doubleclick and much more)[*]Using dllcall for full control over fileopendialog, Make DirMove act somewhat normally (by circumventing it...)[*]Avoid problems with "&" (chr(38)) in code, Change desktop maximized area/workspace (fx to make deskbar type app)[*]Change focus behavior when buttons are clicked to work closer to 'standard windows' app[*](Context) Menus With Timed Tooltips, Fast Loops & Operators in AU3[*]Clipboard UDF, A clipboard change notification udf[/list] 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