My friend and I, (He has asked this question here but no one will answer him) are devloping an App. We want to change an image once scanned or loaded from a file.
Example: Our Timage now contains a .BMP we want to be able to contrast, lighten, darken, change red value, and blue level. The last two red and blue are not as critical as contrast, lighten and darken. Will somebody please post the code for this. We don't want to buy a book. All we want is the code. Thanks
As I am giving my full points, I would expect a little more in the way of an answer. We are both new to Delphi and maybe a (grin, grin) small routine would help out? I know "bad joke". How about it? Anyone have a routine?
I did the code myself, but it did not work. I translated what you had. Delphi did it, but not the whole image, just one pixel. Oh well, I'll have to wait or drop the idea.
I used Canvas.Pixels I could only get one pixel to change. I think it requires more than what Delphi offers. I have afriend in Denmark and he said it would require a lot of code. Who knows, I would like to do it, but I guess I won't be. Okay, how do you get the RGB out of TCOLOR? This code to lighten etc... will be valuable to a lot people. I wrote a freeware Twain component and I get tons of requests for it. See what I mean? the intense stuff is hot. I don't sell components. I write software for myself. It relaxes me. (Ya right) Andrew does the same. It's a curiosity thing.
We have discovered that if you place a scrollbar on the screen and in the onchange handler go
Mainform.Color := RGB(Scrollbar1.Position,ScrollBar1.Postion,ScrollBar.Position) that the form will change. Now the problem is how to do this with an image? I think maybe something to do with the canvas and pixels. But how to determine how many pixels? Any suggestions?
Maybe I should explain. I have only been using Delphi for about a month. I sort get what you mean. I am getting frustrated. I don't believe that there is an answer to this. Is there a way or not a way? Would someone please tell me the code? I figured out the first part now all i need is to know:
How to do it in memory.
How to do the whole image at once.
I figured it out anyway. It's not done with Pixels[x,y] it's a little more than that.