Click here to Skip to main content
15,892,746 members
Articles / Web Development / ASP.NET

Applying a Color Wash to Images

Rate me:
Please Sign up or sign in to vote.
4.65/5 (18 votes)
15 Dec 2005CPOL7 min read 107.7K   1.1K   54  
This article demonstrates how to apply a color wash to images within .NET, complimenting what's possible with CSS.
'----------------------------------------
'Note: This library code was developed by Gavin Harriss 
'      gavinharriss@yahoo.com
'----------------------------------------

'----------------------------------------
'GavDev.Image.Info
'----------------------------------------
'Library code to get information about images.
Public Class Info

    'Returns image dimensions
    'Note: ByRef parameters used to return values
    Public Shared Sub GetImageDimensions(ByRef Width As Integer, ByRef Height As Integer, ByVal FilePath As String)
        Dim bmp As System.Drawing.Bitmap = New System.Drawing.Bitmap(FilePath)

        Try
            'Grab dimensions
            Width = bmp.Width
            Height = bmp.Height

        Finally

            'Clean up
            bmp.Dispose()

        End Try

    End Sub

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
New Zealand New Zealand
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions