SA :)
Here we're again talking about images, it's all about image processing course :D
well I needed my package to do a specific action depending on whether the image is colored or grayscale.
So, how to achieve this ?!
I searched a lot but I reached nothing :S
so I had to loop the pixels of the image and make sure that the RGB components of each pixel are equal to detect it as grayscale.
How bad !!
But finally I discovered another simple method ;)
consider you have a Bitmap object called Myimage.
the condition of grayscale is( Myimage.Palette.Flags = = 2)
so if this condition is true Myimage is grayscale, else it's colored :D
Yes..That easy ;)
Enjoy it ;) :D
أحسنوا الظن بالله :)
9 years ago
7 comments:
nice post & nice blog
go on (Y);)
nice :)
Thnx girls ;) :D
البوست دي تضحك أوي بجد :]
:D:D:D:D:D
اشمعنا يعنى :D
عشان بتبين معاناتى فى ال
package
يعنى !! :D
لأ أصل مخدتش بالي ان البوست قصيرة
و كنت متخيل الحل ألجورزم رهيب مثلا :]
لقيت الحل سطر واحد فا ضحكت جامد :]
:D :D :D lol
هى دى التكنولوجيا بقى (H)
Post a Comment