Jump to content

Convert array of colors into an image


Recommended Posts

Simplified version: my program reads the color of the screen pixels and stores them into a variable or an array. I want it to make some operations on these colors and then generate an image, given those variables or that array. How do I do it?

Example of code:

Dim $pixel[@desktopheight*@desktopwidth+1]
Local $n
For $x=0 to @desktopwidth
   For $y=0 to @desktopheight
      $n=$n+1
      $pixel[$n]=_ColorGetRed(PixelGetColor($x, $y))
      $pixel[$n]=$pixel[$n]+random(0, 255-$pixel[$n]) ; example of manipulating the color
   Next
Next
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...