Hi all,
I don't found function for used color. And I think I seek all pixel and find unique color. How can I get pixel color fast?
Hi all,
I don't found function for used color. And I think I seek all pixel and find unique color. How can I get pixel color fast?
I am sorry, but I don't quite understand, can you restate the question?
In general though, if the Qt supplied function is not good enough for your case, you can do the conversion your self, by iterating through the image - read the QImage documentation on how to access each pixel and how to set pixel values.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
hi @high_flyer,
I want to find the colors in the image. is there any function for this. if there is not a function for this how can i inspect the colors pixel by pixel.
Thanks
Yes there is a method for it - READ the QImage DOCUMENTATION!!
http://doc.trolltech.com/4.4/qimage....l-manipulation
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
I read and I don't see getPixel :S
"To alter or add a color to an image's color table, use the setColor () function."
But I want to pixel color
Last edited by electronicboy; 3rd November 2009 at 10:30.
reading doesn't mean to look for the function names YOU think are used, but to read the WHOLE class documentation, then you will know how and what you can do with the class!
http://doc.trolltech.com/4.4/qimage.html#pixel-2
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
I forgot to tell I read again and I see pixel function. Also my english is not good. And I am a C#.net developer. I don't use .net. I write the programe in .net and i wrote again in qt. I'm trying to learn qt. Thanks for your's approach and supports.
Last edited by electronicboy; 3rd November 2009 at 11:31.
Bookmarks