Banana Posted September 17, 2007 Share Posted September 17, 2007 can I Get A percent Of color (From Pict wide In X , X , X ,) And Get Percent Of Color Green = 10 % Yellow = 25 % Red = 30 % Bloe = 35% Help me Pls Link to comment Share on other sites More sharing options...
martin Posted September 17, 2007 Share Posted September 17, 2007 (edited) can I Get A percent Of color (From Pict wide In X , X , X ,)And Get Percent Of Color Green = 10 %Yellow = 25 %Red = 30 %Bloe = 35%Help me PlsI'm not sure what you mean here.If you have the value of a colour, say it is $cv, and you want to reduce, ie darken, the colour component of the red, the green and the blue then you could do this$Blue = Int((BitAnd($cv, 0xff0000)/(0x10000) * 0.3); make 30% as bright$Green = Int((BitAnd($cv,0x00ff00)/0x100) * 0.1)$Red = Int(BitAnd($cv,0x0000ff) * 0.25)$Trans = BitAnd($cv,0xff000000)$newcol = Int($Red + $Green* 0x100 + $Blue * 0x10000 + $trans) Edited September 17, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Banana Posted September 17, 2007 Author Share Posted September 17, 2007 Sorry Im not very good in english ... Examp If i Have a picture file. Width 200 pixcels x 100 pixcels = 20000 pixels and contain 4 color red , green , blue , black , ( pixels place is random) can autoit calculate & get this result ? red = 2500 pixels or in percent = 25 % green = 2500 pixcels or in percent = 25 % Blue = 2500 pixcels or in percent = 25 % Black = 2500 pixcels or in percent = 25 % Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now