|
-
Feb 14th, 2007, 11:42 AM
#1
Thread Starter
Member
-
Feb 14th, 2007, 11:44 AM
#2
Thread Starter
Member
Re: [2005] want Help in generating random images
sorry for the image tag. i wish i could show the sample image there ... but no prob. i hope the text could explain the scenario
-
Feb 15th, 2007, 08:39 AM
#3
Hyperactive Member
Re: [2005] want Help in generating random images
What u can do is for each string do random rotation using
RotateTransform function
Enjoy..
VB Code:
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Drawing.Drawing2D
// Windows Generated Code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Response.Clear()
Dim bmpimage As New Bitmap(250, 50, PixelFormat.Format24bppRgb)
Dim objimage As Graphics = Graphics.FromImage(bmpimage)
objimage.SmoothingMode = SmoothingMode.HighSpeed
objimage.Clear(Color.LightGreen)
objimage.TranslateTransform(29, 15)
[B] objimage.RotateTransform(23, MatrixOrder.Prepend)[/B] objimage.DrawString("p", New Font("Tahoma", 14, FontStyle.Regular), SystemBrushes.WindowText, New PointF(0, 0))
objimage.RotateTransform(-40, MatrixOrder.Prepend)
objimage.DrawString("A", New Font("Tahoma", 14, FontStyle.Regular), SystemBrushes.WindowText, New PointF(8, 0))
bmpimage.Save(Response.OutputStream, ImageFormat.Jpeg)
objimage.Dispose()
bmpimage.Dispose()
Response.End()
End Sub
End Class
Last edited by Coool; Feb 15th, 2007 at 11:26 PM.
I am using .NET 2010 with Windows 7
-
Feb 19th, 2007, 10:57 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|