GetPixel API to place the color of each pixel in a 2-dimensional long array


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: GetPixel API to place the color of each pixel in a 2-dimensional long array

  1. #1
    Join Date
    Mar 2007
    Posts
    22

    GetPixel API to place the color of each pixel in a 2-dimensional long array

    can somebody provide me the code to represent all the pixel in the picture( i hv attach the picture) in 2d array in a plain text.

    for example:
    x,y,RGBvalue
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    load the file in a picturebox, and then in two nested For loops use its Point(x,y) method to get the value for each pixel
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  3. #3
    Join Date
    Mar 2007
    Posts
    22
    Quote Originally Posted by mstraf
    load the file in a picturebox, and then in two nested For loops use its Point(x,y) method to get the value for each pixel
    can u show me how to used two nested For loops use its Point(x,y) method to get the value for each pixel? i have no idea on it.

  4. #4
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    for y = 0 to imageHeight-1
    for x = 0 to imageWidth -1
    pelValue = pct.Point(x,y)
    next
    next
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

Similar Threads

  1. Change NT service config (disabled -> enabled)
    By pavel in forum VB Classic
    Replies: 0
    Last Post: 10-17-2001, 08:06 PM
  2. Problems with NetAddUser
    By Jeff Morgan in forum VB Classic
    Replies: 2
    Last Post: 02-13-2001, 10:49 AM
  3. Problems with NetAddUser
    By Jeff Morgan in forum VB Classic
    Replies: 0
    Last Post: 02-11-2001, 12:54 PM
  4. Adding New NT User Account
    By John Whitney in forum VB Classic
    Replies: 2
    Last Post: 02-01-2001, 11:15 PM
  5. Replies: 2
    Last Post: 10-18-2000, 10:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center