Rank: Member
Groups: Member
Joined: 5/23/2006(UTC) Posts: 11
|
I have a bit of a problem generating text in an image. Text is drawn using DrawArtisticText, with an outline and fill, but spikes are appearing above or below certain characters - seems to be something to do with the rendering of the outline. Exactly which characters are affected depends upon what font family is being used - I am using Impress BT and this seems to be worse than some other fonts. I have included the ASP code used (below), and you can see exactly what is going on by viewing the attached JPEG image. If anyone has any suggestions on work-arounds I'd be most gratful. In the meantime, can the Aurigma developers take a look? Thanks, Crimblepud ASP CODE BELOW: ################################################################## Code:<!-- METADATA TYPE="typelib" UUID="{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"-->
<%
Option Explicit
Response.Buffer = true
Dim strStringA, strStringB
strStringA = "the quick brown fox jumps over the lazy dog"
' Create the Bitmap object...
Dim objBitmapText
Set objBitmapText = Server.CreateObject("GraphicsMill.Bitmap")
' Create bitmap with transparent background...
objBitmapText.CreateNew 800, 300, Format32bppArgb, &h00FFFFFF&
' Now draw the text...
With objBitmapText.Graphics
.Engine = DrawingEngineGdiplus
.Antialiasing = true
.TextFormat.FontName = "Impress BT"
.TextFormat.FontColor = .Color.CreateRGB(73, 1, 73)
.TextFormat.FontSize = 30
.TextFormat.HorizontalAlignment = HorizontalAlignmentCenter
.TextFormat.VerticalAlignment = VerticalAlignmentBottom
.Unit = UnitPixel
.Brush.PrimaryColor = .Color.CreateRGB(64, 57, 161)
.Pen.ForeColor = .Color.CreateRGB(211, 209, 233)
.Pen.Weight = 4
.DrawArtisticText strStringA, 400, 100, true, true
.DrawText strStringA, 400, 100
.DrawArtisticText UCase(strStringA), 400, 200, true, true
.DrawText UCase(strStringA), 400, 200
End With
' Apply glow effect on text...
objBitmapText.ArtisticEffects.Glow objBitmapText.Graphics.Color.CreateRGB(211, 209, 233), 1, false
' Set image format...
objBitmapText.Formats.SelectCurrent "JPEG"
objBitmapText.Formats.JpegIsProgressive = True
objBitmapText.Formats.JpegQuality = 100
' Save image to response stream (e.g. draw to page)...
objBitmapText.SaveToStream Response
Set objBitmapText = Nothing
%>
Edited by user Wednesday, December 19, 2007 4:39:53 PM(UTC)
| Reason: Not specified Crimblepud attached the following image(s):
|