inversion - How can I reverse the colors of an image with the tool ColorMatrix? -
what values have put in matrix?
dim clmatriz imaging.colormatrix = new imaging.colormatrix(new single()() _ {new single() {¿?, 0, 0, 0, 0}, _ new single() {0, ¿?, 0, 0, 0}, _ new single() {0, 0, ¿?, 0, 0}, _ new single() {0, 0, 0, ¿?, 0}, _ new single() {0, 0, 0, 0, ¿?})
though not sure how particular version of color matrix works , if pixel values in range 0-255 or 0-1 here's how should work:
in case pixel range 0-255:
dim clmatriz imaging.colormatrix = new imaging.colormatrix(new single()() _ {new single() {-1, 0, 0, 0, 255}, _ new single() {0, -1, 0, 0, 255}, _ new single() {0, 0, -1, 0, 255}, _ new single() {0, 0, 0, 1, 0}, _ new single() {0, 0, 0, 0, 1})
in case 0-1:
dim clmatriz imaging.colormatrix = new imaging.colormatrix(new single()() _ {new single() {-1, 0, 0, 0, 1}, _ new single() {0, -1, 0, 0, 1}, _ new single() {0, 0, -1, 0, 1}, _ new single() {0, 0, 0, 1, 0}, _ new single() {0, 0, 0, 0, 1})
Comments
Post a Comment