Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Crimblepud  
#1 Posted : Tuesday, May 23, 2006 11:48:12 PM(UTC)
Crimblepud

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):
gm_bug_1.jpg
Andrew  
#2 Posted : Wednesday, May 24, 2006 6:04:41 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
Perhaps this is a problem of a specific font. Could you submit case with this font? By the way, what happens if you use GDI instead of GDI+?

Edited by user Thursday, May 22, 2008 10:42:36 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.