|
-
Jun 8th, 2000, 01:01 AM
#1
Thread Starter
Junior Member
i posted a similar question under graphics, but i suspect the solution will come from an API call, so here goes. I want to be able to load a picture into a picturebox and then pixel by pixel, reverse the RGB values and generate the inverted image into a second picturebox. so if a pixel is 5,55,100, it will be reversed to 250,200,155. i want to develop an application that simulates a photographic enlarger. i am looking for an efficient solution to accomplish this.
thans for your help,
Shaheeb
-
Jun 8th, 2000, 02:24 AM
#2
To get a certian pixel, use the GetPixel method. To Set the pixel, you use the SetPixel method. Then when you get the pixel, convert it into RGB and Invert the numbers.
Say, for example, if the picture is 50x100...
Code:
For i = 1 to 50
For o = 1 to 100
Retval = GetPixel(Picture1.hDC, i, o)
SetPixel pictur1.hdc, i, o, RGB(red, green, blue)
Next o
Next i
-
Jun 10th, 2000, 04:21 PM
#3
transcendental analytic
Use Bitblt api with this ROP: vbSrcInvert
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 10th, 2000, 09:34 PM
#4
I found another way. You can draw a box using the Line method. (Make sure the draw mode is Invert)
-
Jun 11th, 2000, 02:31 AM
#5
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 11th, 2000, 03:18 AM
#6
-
Jun 11th, 2000, 04:12 AM
#7
PowerPoster
-
Jun 11th, 2000, 04:50 AM
#8
I said that as a Joke. Now that computer's are 600Mhz, I can't event notice the difference.
-
Jun 11th, 2000, 06:02 AM
#9
transcendental analytic
µµµµµµµµµ Yes it matters µµµµµµµµ ok, depending on what you're doing, but i haven't done any tests yet, so i can't say how much
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 11th, 2000, 10:44 PM
#10
Well, for me it doesn't matter.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|