Hi all,
I have written an Ecard application which takes text input from the
user on one .aspx page and renders the message to a template .jpg and
displays the results on a 2nd .aspx page. The trouble is that my fonts
render fine on my local host machine but very jaggie on the server. IIS
5.1 is being used on my local host and our server is running windows
2000, IIS 5.0. However, my IT guy tells me there is no fundamental
differences between the two and it shouldn't affect my drawing output.
Here is my code:
===========================
Sub renderUserImage(ByVal srcImage As String, ByVal destImage As
String)
Dim strFileName, newImagePath As String
newImagePath = Server.MapPath("EcardsRendered/" & destImage &
".jpg")
strFileName = srcImage
Dim newImageFormat As System.Drawing.Imaging.ImageFormat
newImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
' create New image and bitmap objects.
Dim i As System.Drawing.Image =
System.Drawing.Image.FromFile(strFileName)
' Render the users messag here
Dim g As Graphics = Graphics.FromImage(i)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
g.InterpolationMode = Drawing.Drawing2D.InterpolationMode.High
Dim sf As StringFormat =
CType(StringFormat.GenericTypographic.Clone(), StringFormat)
sf.Alignment = StringAlignment.Center ' near, far or
center (paragraph)
sf.LineAlignment = StringAlignment.Center
' Fontsize adjustments:
If Me.UserFont = 0 Then
Me.DynFontSize = DynFontSize + 1
End If
If Me.UserFont = 1 Then
Me.DynFontSize = DynFontSize - 1
End If
If Me.UserFont = 3 Then
Me.DynFontSize = DynFontSize + 2
End If
' Build the drawstring dynamically:
g.DrawString(UserMessage, New Font(StrChosenFont, DynFontSize,
FontStyle.Regular), Brushes.Black, New RectangleF(354, 58, 224, 274),
sf)
g.Dispose()
end sub
==============================
any help would be appreciated.
thanks, 3 1577
Did you try saving the image to disk on the server and then downloading that
same image to your PC and viewing it?
Are you sure the server has the same version of the .NET Framework?
--
2005 Microsoft MVP C#
Robbe Morris http://www.robbemorris.com http://www.mastervb.net/home/ng/foru...t10017013.aspx http://www.eggheadcafe.com/articles/..._generator.asp
"MikeB" <Mi***@discussions.microsoft.com> wrote in message
news:39**********************************@microsof t.com... Hi all,
I have written an Ecard application which takes text input from the user on one .aspx page and renders the message to a template .jpg and displays the results on a 2nd .aspx page. The trouble is that my fonts render fine on my local host machine but very jaggie on the server. IIS 5.1 is being used on my local host and our server is running windows 2000, IIS 5.0. However, my IT guy tells me there is no fundamental differences between the two and it shouldn't affect my drawing output. Here is my code:
===========================
Sub renderUserImage(ByVal srcImage As String, ByVal destImage As String) Dim strFileName, newImagePath As String newImagePath = Server.MapPath("EcardsRendered/" & destImage & ".jpg") strFileName = srcImage
Dim newImageFormat As System.Drawing.Imaging.ImageFormat
newImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
' create New image and bitmap objects. Dim i As System.Drawing.Image = System.Drawing.Image.FromFile(strFileName)
' Render the users messag here Dim g As Graphics = Graphics.FromImage(i)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
g.InterpolationMode = Drawing.Drawing2D.InterpolationMode.High
Dim sf As StringFormat = CType(StringFormat.GenericTypographic.Clone(), StringFormat) sf.Alignment = StringAlignment.Center ' near, far or center (paragraph) sf.LineAlignment = StringAlignment.Center
' Fontsize adjustments: If Me.UserFont = 0 Then Me.DynFontSize = DynFontSize + 1 End If
If Me.UserFont = 1 Then Me.DynFontSize = DynFontSize - 1 End If
If Me.UserFont = 3 Then Me.DynFontSize = DynFontSize + 2 End If
' Build the drawstring dynamically:
g.DrawString(UserMessage, New Font(StrChosenFont, DynFontSize, FontStyle.Regular), Brushes.Black, New RectangleF(354, 58, 224, 274), sf)
g.Dispose() end sub
==============================
any help would be appreciated.
thanks,
Did you try saving the image to disk on the server and then downloading that
same image to your PC and viewing it?
Are you sure the server has the same version of the .NET Framework?
--
2005 Microsoft MVP C#
Robbe Morris http://www.robbemorris.com http://www.mastervb.net/home/ng/foru...t10017013.aspx http://www.eggheadcafe.com/articles/..._generator.asp
"MikeB" <Mi***@discussions.microsoft.com> wrote in message
news:39**********************************@microsof t.com... Hi all,
I have written an Ecard application which takes text input from the user on one .aspx page and renders the message to a template .jpg and displays the results on a 2nd .aspx page. The trouble is that my fonts render fine on my local host machine but very jaggie on the server. IIS 5.1 is being used on my local host and our server is running windows 2000, IIS 5.0. However, my IT guy tells me there is no fundamental differences between the two and it shouldn't affect my drawing output. Here is my code:
===========================
Sub renderUserImage(ByVal srcImage As String, ByVal destImage As String) Dim strFileName, newImagePath As String newImagePath = Server.MapPath("EcardsRendered/" & destImage & ".jpg") strFileName = srcImage
Dim newImageFormat As System.Drawing.Imaging.ImageFormat
newImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
' create New image and bitmap objects. Dim i As System.Drawing.Image = System.Drawing.Image.FromFile(strFileName)
' Render the users messag here Dim g As Graphics = Graphics.FromImage(i)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
g.InterpolationMode = Drawing.Drawing2D.InterpolationMode.High
Dim sf As StringFormat = CType(StringFormat.GenericTypographic.Clone(), StringFormat) sf.Alignment = StringAlignment.Center ' near, far or center (paragraph) sf.LineAlignment = StringAlignment.Center
' Fontsize adjustments: If Me.UserFont = 0 Then Me.DynFontSize = DynFontSize + 1 End If
If Me.UserFont = 1 Then Me.DynFontSize = DynFontSize - 1 End If
If Me.UserFont = 3 Then Me.DynFontSize = DynFontSize + 2 End If
' Build the drawstring dynamically:
g.DrawString(UserMessage, New Font(StrChosenFont, DynFontSize, FontStyle.Regular), Brushes.Black, New RectangleF(354, 58, 224, 274), sf)
g.Dispose() end sub
==============================
any help would be appreciated.
thanks,
Yes we have tried to check the rendered images and viewed it. The images that
were rendered are definitely bad quality.
Also just checked the .net framework version and both XP Pro and Windows
2000 are using the same (latest) version, ASP.NET_1.1.4322.2032
What else could be causing the differences in result?
"Robbe Morris [C# MVP]" wrote: Did you try saving the image to disk on the server and then downloading that same image to your PC and viewing it?
Are you sure the server has the same version of the .NET Framework? -- 2005 Microsoft MVP C# Robbe Morris http://www.robbemorris.com http://www.mastervb.net/home/ng/foru...t10017013.aspx http://www.eggheadcafe.com/articles/..._generator.asp "MikeB" <Mi***@discussions.microsoft.com> wrote in message news:39**********************************@microsof t.com... Hi all,
I have written an Ecard application which takes text input from the user on one .aspx page and renders the message to a template .jpg and displays the results on a 2nd .aspx page. The trouble is that my fonts render fine on my local host machine but very jaggie on the server. IIS 5.1 is being used on my local host and our server is running windows 2000, IIS 5.0. However, my IT guy tells me there is no fundamental differences between the two and it shouldn't affect my drawing output. Here is my code:
===========================
Sub renderUserImage(ByVal srcImage As String, ByVal destImage As String) Dim strFileName, newImagePath As String newImagePath = Server.MapPath("EcardsRendered/" & destImage & ".jpg") strFileName = srcImage
Dim newImageFormat As System.Drawing.Imaging.ImageFormat
newImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
' create New image and bitmap objects. Dim i As System.Drawing.Image = System.Drawing.Image.FromFile(strFileName)
' Render the users messag here Dim g As Graphics = Graphics.FromImage(i)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
g.InterpolationMode = Drawing.Drawing2D.InterpolationMode.High
Dim sf As StringFormat = CType(StringFormat.GenericTypographic.Clone(), StringFormat) sf.Alignment = StringAlignment.Center ' near, far or center (paragraph) sf.LineAlignment = StringAlignment.Center
' Fontsize adjustments: If Me.UserFont = 0 Then Me.DynFontSize = DynFontSize + 1 End If
If Me.UserFont = 1 Then Me.DynFontSize = DynFontSize - 1 End If
If Me.UserFont = 3 Then Me.DynFontSize = DynFontSize + 2 End If
' Build the drawstring dynamically:
g.DrawString(UserMessage, New Font(StrChosenFont, DynFontSize, FontStyle.Regular), Brushes.Black, New RectangleF(354, 58, 224, 274), sf)
g.Dispose() end sub
==============================
any help would be appreciated.
thanks, This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jamie Davison |
last post by:
I'm have GD 2.0.1 - php 4.3.5 compiled
--with-gd--enable-gd-native-ttf--enable-gd-jis-conv
--with-freetype-dir=/usr/local' '--with-t1lib=/usr/local...
|
by: Jack Charbonneau |
last post by:
I have a bunch of custom fonts installed on my system.
For instance if I look at the font drop-down in word pad
I see about 90 fonts, but if I build an app using VS.Net,
add a label, and try to...
|
by: Pugi! |
last post by:
On a freshly installed Fedora C3 (incl. webserver apache php mysql) i get
the following problem when connecting to mysql through a browser
(phpMyAdmin):
:
#2002 Can't connect to local MySQL...
|
by: MLH |
last post by:
Using MS Access, I have attached to MySQL servers in other states
and other countries on the other side of my router. But when I use the
MySQL ODBC driver 3.51 to connect to a MySQL server on my...
|
by: Rod |
last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some
reason, opening some ASP.NET applications we wrote is producing the
following error message:
"The Web server reported...
| |
by: MikeB |
last post by:
Hi all,
I have written an Ecard application which takes text input from the
user on one .aspx page and renders the message to a template .jpg and
displays the results on a 2nd .aspx page. The...
|
by: craig.overton |
last post by:
All,
I am currently developing an FTP class in VB.NET. It's kid tested,
mother approved when trying to access an FTP Server on a Windows box
meaning I can connect, run commands, upload and...
|
by: Dean Craig |
last post by:
I'm getting ready to build my first ASP.NET/SQL Server website that will be
hosted on some web host out there (long distance, different network). The
work I've done in the past (pre-.NET) was all...
|
by: eblackmo |
last post by:
I have a test network consisting of four servers running windows 2003 server R2 SP2. I have set up a domain which functioned correctly for about a day and a half until the other servers decided they...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| | |