Recolor image shearing : Image Color « 2D Graphics « VB.Net Tutorial

VB.Net Tutorial
1. Language Basics
2. Data Type
3. Operator
4. Statements
5. Date Time
6. Class Module
7. Development
8. Collections
9. Generics
10. Attributes
11. Event
12. Stream File
13. GUI
14. GUI Applications
15. 2D Graphics
16. I18N Internationlization
17. Reflection
18. Regular Expressions
19. Security
20. Socket Network
21. Thread
22. Windows
23. XML
24. Database ADO.net
25. Design Patterns
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial » 2D Graphics » Image Color 
15. 46. 6. Recolor image shearing
 

Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

public class RecoloringShearing
   public Shared Sub Main
        Application.Run(New Form1)
   End Sub
End class

public class Form1
  Inherits System.Windows.Forms.Form

  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
        Dim As Graphics = Me.CreateGraphics()
        g.Clear(Me.BackColor)

        Dim curBitmap As New Bitmap("yourfile.jpg")

        Dim ptsArray As Single()() {New Single() {10000}, New Single() {01000}, New Single() {0.5F0100}, New Single() {00010}, New Single() {00001}}

        Dim clrMatrix As New ColorMatrix(ptsArray)

        Dim imgAttribs As New ImageAttributes

        imgAttribs.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default)

        g.DrawImage(curBitmap, 00200200)

        g.DrawImage(curBitmap, New Rectangle(2050200200)00, curBitmap.Width, curBitmap.Height, GraphicsUnit.Pixel, imgAttribs)

        curBitmap.Dispose()
        g.Dispose()

  End Sub

  Public Sub New()
   
    MyBase.New()
    Me.AutoScaleBaseSize = New System.Drawing.Size(513)
    Me.ClientSize = New System.Drawing.Size(292273)
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen

  End Sub

End Class

        
15. 46. Image Color
15. 46. 1. Pick a color from an Image
15. 46. 2. Gray Scale Image
15. 46. 3. Recolor ImageRecolor Image
15. 46. 4. Recolor image rotation
15. 46. 5. Recolor image ScalingRecolor image Scaling
15. 46. 6. Recolor image shearing
ww___w__.j___a__v_a_2___s_._c__o___m | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.