SleepyXtreme Posted June 18, 2010 Posted June 18, 2010 (edited) Hi, i've worked with autoit for quite some time and for some reason i cannot figure out how to do what i'm trying to do: I want to do the following: 1. OpenDialog and pick an image.(knew this already ) 2. Load all of the pixels of that Image into an Array to work with in a loop. ie. $image = FileOpenDialog() PixelWidth = getWidth( $image) PixelHeight = getHeight( $image) For x to PixelWidth For y to PixelHeight $var = getPixel[x][y] ($var is now = to a pixel ) $blue= getBlue($var) $green = getGreen($var) $red = getRed($var) setBlue(255 - $blue) setRed(255 - $red) setGreen(255 - $green) I also want to get the red, green, and blue values of each pixel and be able to change them. i've written things like this in other languages but i'm stumped on how to do it in autoitscript. any ideas? Edited June 18, 2010 by SleepyXtreme
SleepyXtreme Posted June 18, 2010 Author Posted June 18, 2010 ok well I found a few components: _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($fname) $iX = _GDIPlus_ImageGetWidth($hImage) $iY = _GDIPlus_ImageGetHeight($hImage) this will set my starting values however, i'm in still in search of how to loop through all of the pixels and edit/examine each individual pixel.
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