H
Henry Wu
Hi I was at the search for making e.Graphics.DrawImage turn any image
to Grayscale, and I found two similar solutions but different
ColorMatrix values, what is the difference between the two? Is there
an industry standard for the GrayScale ColorMatrix values?
Thanks,
Henry
Solution #1, Jacob Grass:
http://groups.google.com.ph/groups?...3395&seekm=uLXNhTJhBHA.1644@tkmsftngp05#link3
Dim GrayShear()() As Single = New Single()() _
{New Single(4) {0.5, 0.5, 0.5, 0, 0}, _
New Single(4) {0.5, 0.5, 0.5, 0, 0}, _
New Single(4) {0.5, 0.5, 0.5, 0, 0}, _
New Single(4) {0, 0, 0, 1, 0}, _
New Single(4) {0, 0, 0, 0, 1}}
Solution #2, Bob Powell:
http://groups.google.com.ph/groups?...m=#[email protected]#link4
Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
{New Single() {0.3, 0.3, 0.3, 0, 0}, _
New Single() {0.59, 0.59, 0.59, 0, 0}, _
New Single() {0.11, 0.11, 0.11, 0, 0}, _
New Single() {0, 0, 0, 1, 0}, _
New Single() {0, 0, 0, 0, 1}})
These are just portions of the code, I just copied and pasted the
Grayscale ColorMatrix values and they differ from one another.
to Grayscale, and I found two similar solutions but different
ColorMatrix values, what is the difference between the two? Is there
an industry standard for the GrayScale ColorMatrix values?
Thanks,
Henry
Solution #1, Jacob Grass:
http://groups.google.com.ph/groups?...3395&seekm=uLXNhTJhBHA.1644@tkmsftngp05#link3
Dim GrayShear()() As Single = New Single()() _
{New Single(4) {0.5, 0.5, 0.5, 0, 0}, _
New Single(4) {0.5, 0.5, 0.5, 0, 0}, _
New Single(4) {0.5, 0.5, 0.5, 0, 0}, _
New Single(4) {0, 0, 0, 1, 0}, _
New Single(4) {0, 0, 0, 0, 1}}
Solution #2, Bob Powell:
http://groups.google.com.ph/groups?...m=#[email protected]#link4
Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
{New Single() {0.3, 0.3, 0.3, 0, 0}, _
New Single() {0.59, 0.59, 0.59, 0, 0}, _
New Single() {0.11, 0.11, 0.11, 0, 0}, _
New Single() {0, 0, 0, 1, 0}, _
New Single() {0, 0, 0, 0, 1}})
These are just portions of the code, I just copied and pasted the
Grayscale ColorMatrix values and they differ from one another.