edpoguatemala Posted July 31, 2019 Share Posted July 31, 2019 Hello everyone, I have been looking for the following and haven't find the answer yet. I have a folder where there is .bmp images in RGB, and I need to convert all the images in that folder to CMYK. Then all those files I'll need to export(save) them to .TIFF format. Thank you for any help you can provide. I'll appreciate any script example you can share. Link to comment Share on other sites More sharing options...
Seminko Posted July 31, 2019 Share Posted July 31, 2019 When it comes to image manipulation, I'm a fan of ImageMagick. edpoguatemala 1 Link to comment Share on other sites More sharing options...
Werty Posted July 31, 2019 Share Posted July 31, 2019 (edited) Yes, ImageMagick would do the trick, though COM is broken in newer autoit's, you'll have to revert back to 3.3.12 or 3.3.10 to be sure all of it works. Like this works in 3.3.12 but not in later versions For $Loop = 0 To 8 $img.Convert("-size","1024x1024","xc:", "-seed",String(9669 + $Loop), "+noise","Random", "-write", "mpr:random","+delete", _ "mpr:random","-channel","r","-threshold",String(GUICtrlRead($VegDensityGUI[$Loop])/10) & "%","-separate","+channel","-negate","-fill",$VegColor[$Loop],"-opaque","white","-write","mpr:" & $VegName[$Loop],"+delete", _ "./Media/Textures/heightmap.png", "-write","mpr:heightmap", "-threshold","35%", "-write","mpr:low","+delete", _ "mpr:heightmap","-threshold","55%","mpr:low","-compose","Difference","-composite","-write","mpr:treemap","+delete", _ "mpr:" & $VegName[$Loop], "mpr:treemap", "-compose","Multiply", "-composite", "-flop", "-write","mpr:treemap", "+delete", _ "mpr:treemap", "-morphology" ,"hmt","5:0,0,0,0,0 0,0,0,0,0 0,0,1,0,0 0,0,0,0,0 0,0,0,0,0","./Media/Models/Trees/" & $VegName[$Loop] & "Map.png") Next Edited July 31, 2019 by Werty edpoguatemala 1 Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
Seminko Posted August 1, 2019 Share Posted August 1, 2019 Well, you can always ShellExecute. $ImageMagickExePath = "C:\Program Files\ImageMagick-6.9.3-Q16\convert.exe" $ImageToReadPath = @ScriptDir & "\message.jpg" $ImageToReadPathResult = @ScriptDir & "\message_result.jpg" ShellExecuteWait($ImageMagickExePath, '"' & $ImageToReadPath & '" -fuzz ' & $Percentage & '% -fill black +opaque "#' & $Coloer & '" -threshold 20% -negate "' & $ImageToReadPathResult & '"', "", "", @SW_HIDE) edpoguatemala 1 Link to comment Share on other sites More sharing options...
edpoguatemala Posted August 1, 2019 Author Share Posted August 1, 2019 Dear @Werty and @Seminko, Thank you very much for the response. The link to ImageMagick actually help me to complete the task. I download some cmyk profiles and ran the command: convert cmyk_image.jpg -colorspace rgb rgb_image.jpg Now I have to execute that from my autoit script. Thanks for your help. Link to comment Share on other sites More sharing options...
Werty Posted August 1, 2019 Share Posted August 1, 2019 On a side note, when manipulating images, use a lossless format like png or bmp, if you use jpg it will degrade the image even further for each step, compressing an already compressed image. edpoguatemala 1 Some guy's script + some other guy's script = my script! 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