Merci, ça m'a un peu aider pour faire autre chose, j'ai utilisé que ça pour le moment :
Private Sub BtRV_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtRV.Click
' Display the red, green, and blue component images.
Dim image_attr As New ImageAttributes
Dim cm As ColorMatrix
Dim rect As Rectangle = _
Rectangle.Round(PictureBox2.Image.GetBounds(GraphicsUnit.Pixel))
Dim wid As Integer = PictureBox2.Image.Width
Dim hgt As Integer = PictureBox2.Image.Height
Dim bm As Bitmap
Dim gr As Graphics
Dim theta As Single
' Swap red/green.
bm = New Bitmap(wid, hgt)
gr = Graphics.FromImage(bm)
theta = PI / 6
cm = New ColorMatrix(New Single()() { _
New Single() {0.0, 1.0, 0.0, 0.0, 0.0}, _
New Single() {1.0, 0.0, 0.0, 0.0, 0.0}, _
New Single() {0.0, 0.0, 1.0, 0.0, 0.0}, _
New Single() {0.0, 0.0, 0.0, 1.0, 0.0}, _
New Single() {0.0, 0.0, 0.0, 0.0, 1.0}})
image_attr.SetColorMatrix(cm)
gr.DrawImage(PictureBox1.Image, rect, 0, 0, wid, hgt, _
GraphicsUnit.Pixel, image_attr)
PicRV.Image = bm
' Swap green/blue.
bm = New Bitmap(wid, hgt)
gr = Graphics.FromImage(bm)
theta = PI / 3
cm = New ColorMatrix(New Single()() { _
New Single() {1.0, 0.0, 0.0, 0.0, 0.0}, _
New Single() {0.0, 0.0, 1.0, 0.0, 0.0}, _
New Single() {0.0, 1.0, 0.0, 0.0, 0.0}, _
New Single() {0.0, 0.0, 0.0, 1.0, 0.0}, _
New Single() {0.0, 0.0, 0.0, 0.0, 1.0}})
image_attr.SetColorMatrix(cm)
gr.DrawImage(PictureBox1.Image, rect, 0, 0, wid, hgt, _
GraphicsUnit.Pixel, image_attr)
PicVB.Image = bm
' Swap blue/red.
bm = New Bitmap(wid, hgt)
gr = Graphics.FromImage(bm)
theta = PI / 2
cm = New ColorMatrix(New Single()() { _
New Single() {0.0, 0.0, 1.0, 0.0, 0.0}, _
New Single() {0.0, 1.0, 0.0, 0.0, 0.0}, _
New Single() {1.0, 0.0, 0.0, 0.0, 0.0}, _
New Single() {0.0, 0.0, 0.0, 1.0, 0.0}, _
New Single() {0.0, 0.0, 0.0, 0.0, 1.0}})
image_attr.SetColorMatrix(cm)
gr.DrawImage(PictureBox1.Image, rect, 0, 0, wid, hgt, _
GraphicsUnit.Pixel, image_attr)
PicBR.Image = bm
End Sub
qu'est que je dois modifier (et où ?) dans le code pour faire un effet, sépia par exemple, sans utilisé le "dim rect as rectangle ..." qui, si j'ai bien compris, m'oblige a avoir 4 pictures box; comment ou par quoi je le modifie pour utilisé un seul pictureBox1 et qui change en sépia avec un bouton ?
-> il faut déjà enlever tout ce qui a au dessous de " swap green/blue" dans le code au dessus mais après ?