455,280 Members | 1,232 Online
Need help? Post your question and get tips & solutions from a community of 455,280 IT Pros & Developers. It's quick & easy.

# Grayscale ColorMatrix Difference

 P: n/a 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?h...sftngp05#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?h....phx.gbl#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. Nov 21 '05 #1