Computer Science Canada RGB and whatdotcolor |
Author: | Insectoid [ Tue Nov 11, 2008 2:21 pm ] |
Post subject: | RGB and whatdotcolor |
Well, I have been working on a program that takes a picture, gets the information for each pixel (x, y, color) and saves it to a text file before displaying the picture in an interesting way to the screen, using the numbers in the text file. Unfortunately, I am restricted to the 256-bit limits of whatdotcolor (used to get the color information for the pixel). So, is there a way to get the color information in RGB format using whatdotcolor, or even directly obtain the info from the jpeg image? |
Author: | TheGuardian001 [ Tue Nov 11, 2008 3:37 pm ] | ||
Post subject: | Re: RGB and whatdotcolor | ||
yes, you can use the RGB.GetColour command to get RGB values based on the Turing Colour number.
will return the RGB values into the three real variables you give it. |
Author: | The_Bean [ Tue Nov 11, 2008 4:13 pm ] | ||
Post subject: | Re: RGB and whatdotcolor | ||
The problem with using RGB.GetColour is that you first need to know what the colour is you want to get the information for, so you have to use View.WhatDotColour, which returns a colour inside the 256 range, and your back to where you start. To get a better range of colours you need to use RGB.SetColour and RGB.AddColour You can only add up to 1024 or something colours but that still gives a pretty good range.
|
Author: | Insectoid [ Tue Nov 11, 2008 4:32 pm ] |
Post subject: | RE:RGB and whatdotcolor |
Wow...that looks very comlicated and makes little sense...Does it add colors to the 256-bit range? And will it capture the RGB exactly? |
Author: | The_Bean [ Tue Nov 11, 2008 4:44 pm ] | ||
Post subject: | Re: RGB and whatdotcolor | ||
It won't get the RGB exactly, but it comes a lot closer than what turing already has. The main thing you want is
|
Author: | Insectoid [ Tue Nov 11, 2008 4:53 pm ] |
Post subject: | RE:RGB and whatdotcolor |
Hmm...Perhaps I'll just give this a go in Java. Turing is apparently to limited for this kind of activity. |
Author: | SNIPERDUDE [ Wed Nov 12, 2008 8:13 pm ] |
Post subject: | RE:RGB and whatdotcolor |
It is best if you make the RGB retrieving programme in another language, I used VB for mine. |
Author: | Insectoid [ Wed Nov 12, 2008 8:14 pm ] |
Post subject: | RE:RGB and whatdotcolor |
If only I could get the Robot class to work in Java... |