473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Text in images

Ale
Hi, do anyone knows the best way to save text strings in an image space?
I've to print them with a laser plotter and I need them to be the sharpest
possible.
I'd prefer them to be vectorial but I don't know how (and if it is possible)
to do.
I tried to save the string @2400 dpi but when I open the images with such a
program like photoshop they are simply little and when I try to enlarge them
to fit the printing they lose definition and the image is non sharp.
This is a part of the code....
Dim pic As New System.Drawing.Bitmap(wi, he, PixelFormat.Format24bppRgb)
Dim g As Graphics = Graphics.FromImage(pic)
pic.SetResolution(150,150)
Dim solidBrush As New SolidBrush(Color.Black)
g.Clear(sfondogrigio)
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGri dFit
g.SmoothingMode = SmoothingMode.AntiAlias ' antialias objects

g.DrawString(something, font, color,x,y)
Thnks a lot.
Ale
Nov 18 '05 #1
2 1061
Ale,

It really depends on the original image size that you're loading. If you're
loading into a large image space the image must by in the proper resolution
to start with to fill this space.

You can resize of course but you will loose definition in that as you're
experiencing. The key is to make sure the oringal images you have or you
create dynamically are sized in the size that you need to start with. GDI+
is pixel based so it doesn't automatically resize and smooth out things
<g>...
+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"Ale" <ax**********@hotmail.com> wrote in message
news:c2**********@nntp.atlavia.it...
Hi, do anyone knows the best way to save text strings in an image space?
I've to print them with a laser plotter and I need them to be the sharpest
possible.
I'd prefer them to be vectorial but I don't know how (and if it is possible) to do.
I tried to save the string @2400 dpi but when I open the images with such a program like photoshop they are simply little and when I try to enlarge them to fit the printing they lose definition and the image is non sharp.
This is a part of the code....
Dim pic As New System.Drawing.Bitmap(wi, he, PixelFormat.Format24bppRgb)
Dim g As Graphics = Graphics.FromImage(pic)
pic.SetResolution(150,150)
Dim solidBrush As New SolidBrush(Color.Black)
g.Clear(sfondogrigio)
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGri dFit g.SmoothingMode = SmoothingMode.AntiAlias ' antialias objects

g.DrawString(something, font, color,x,y)
Thnks a lot.
Ale

Nov 18 '05 #2
Does this page produce the sort of results you want?

http://www.lamartin.com/dotnet/TextToImage.aspx
"Ale" <ax**********@hotmail.com> wrote in message
news:c2**********@nntp.atlavia.it...
Hi, do anyone knows the best way to save text strings in an image space?
I've to print them with a laser plotter and I need them to be the sharpest
possible.
I'd prefer them to be vectorial but I don't know how (and if it is possible) to do.
I tried to save the string @2400 dpi but when I open the images with such a program like photoshop they are simply little and when I try to enlarge them to fit the printing they lose definition and the image is non sharp.
This is a part of the code....
Dim pic As New System.Drawing.Bitmap(wi, he, PixelFormat.Format24bppRgb)
Dim g As Graphics = Graphics.FromImage(pic)
pic.SetResolution(150,150)
Dim solidBrush As New SolidBrush(Color.Black)
g.Clear(sfondogrigio)
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGri dFit g.SmoothingMode = SmoothingMode.AntiAlias ' antialias objects

g.DrawString(something, font, color,x,y)
Thnks a lot.
Ale

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Chris Beall | last post by:
I'm struggling with how to handle, on a web page, images that contain text that the user must be able to read. Examples: tombstone photos, photos or scans of historic documents (handwritten or...
3
by: JOSEPHINE ALVAREZ | last post by:
I have this code that I want to use to do a rollover. However, because the company I am doing it for is continually changing the text, I want to be able to use dynamic text to change the text on...
16
by: Woodmon | last post by:
I want to flow text in an "irregular" column on the left and place a large image at the top of an "irregular" column to the right. Then after the bottom of the large image I want the text column on...
12
by: Charlie King | last post by:
As I understand it, the use of FIR* to replace heading tags with images in visually enabled CSS browsers is now frowned upon on the basis that some screen readers will *nor* read back text that is...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
10
by: Anthony | last post by:
I am using the following code to display fading pictures on a team website. Can someone show me how to modify it such that I can display the names of each employee when the picture changes? This...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.