<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>System.Drawing/GDI+</title><link>http://forums.asp.net/150.aspx</link><description>Discuss manipulating and creating graphics using the System.Drawing namespace and GDI+.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/3264323.aspx</link><pubDate>Mon, 29 Jun 2009 13:35:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3264323</guid><dc:creator>aschaible</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3264323.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=3264323</wfw:commentRss><description>&lt;p&gt;I was having a similar issue - but I switched to GIF output format&amp;nbsp;and it&amp;#39;s fine now.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2877820.aspx</link><pubDate>Tue, 20 Jan 2009 00:57:57 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2877820</guid><dc:creator>BanjoPickerKing</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2877820.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2877820</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;Imports&lt;/span&gt; System.Drawing
&lt;span class="kwd"&gt;Imports&lt;/span&gt; System.Drawing.Drawing2D 

        &lt;span class="kwd"&gt;Dim&lt;/span&gt; b &lt;span class="kwd"&gt;As New&lt;/span&gt; Bitmap(500, 400)
        &lt;span class="kwd"&gt;Dim&lt;/span&gt; g &lt;span class="kwd"&gt;As&lt;/span&gt; Graphics
        &lt;span class="kwd"&gt;Dim&lt;/span&gt; gp &lt;span class="kwd"&gt;As New&lt;/span&gt; GraphicsPath

        gp.AddString(&lt;span class="st"&gt;&amp;quot;Test String&amp;quot;&lt;/span&gt;, FontFamily.GenericSerif, 0, 72, &lt;span class="kwd"&gt;New&lt;/span&gt; PointF(100, 250), &lt;span class="kwd"&gt;New&lt;/span&gt; StringFormat)

        g = Graphics.FromImage(b)
        g.Clear(Color.White)
        g.SmoothingMode = SmoothingMode.HighQuality
        g.DrawPath(Pens.Black, gp)

        Response.AddHeader(&lt;span class="st"&gt;&amp;quot;Content-Type&amp;quot;&lt;/span&gt;, &lt;span class="st"&gt;&amp;quot;binary/octet-stream&amp;quot;&lt;/span&gt;)
        Response.AddHeader(&lt;span class="st"&gt;&amp;quot;Content-Disposition&amp;quot;&lt;/span&gt;, &lt;span class="st"&gt;&amp;quot;filename=img.jpg&amp;quot;&lt;/span&gt;)
        Response.Flush()

        b.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg)&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;the g.SmoothingMode sets the smoothness, obviously, of the GraphicsPath.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;the graininess or blurriness usually comes up on these GDI images so dont worry too much about it.&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2874060.aspx</link><pubDate>Sun, 18 Jan 2009 06:40:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2874060</guid><dc:creator>pashaKasim</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2874060.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2874060</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;@&lt;a href="http://forums.asp.net/members/BanjoPickerKing.aspx"&gt;BanjoPickerKing&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Do you have an example how to use graphicspath?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanx. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2427107.aspx</link><pubDate>Tue, 17 Jun 2008 03:43:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2427107</guid><dc:creator>BanjoPickerKing</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2427107.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2427107</wfw:commentRss><description>&lt;p&gt;To outline a string, create a graphicspath and use addstring. use this graphicspath in a region and it wil display as an outline of the text&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2381421.aspx</link><pubDate>Mon, 26 May 2008 20:39:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2381421</guid><dc:creator>pashaKasim</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2381421.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2381421</wfw:commentRss><description>&lt;p&gt;Hello GeoSync,&lt;/p&gt;
&lt;p&gt;Can you post an example how you can &amp;quot;outline&amp;quot; and &amp;quot;border&amp;quot; text, when you using DrawString.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanx.&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2339208.aspx</link><pubDate>Tue, 06 May 2008 01:58:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2339208</guid><dc:creator>geosync</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2339208.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2339208</wfw:commentRss><description>&lt;p&gt;Ahmed,&lt;/p&gt;
&lt;p&gt;You could also reduce jaggedness of a font by reducing its size.&amp;nbsp; However, I realize such action can reduce the readability of the text, too.&lt;/p&gt;
&lt;p&gt;Rick&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2339191.aspx</link><pubDate>Tue, 06 May 2008 01:45:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2339191</guid><dc:creator>geosync</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2339191.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2339191</wfw:commentRss><description>&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;Hi Ahmed,&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;I opened MS Word and created your text using the same font.&amp;nbsp; Word produces identical text to that in your image.&amp;nbsp; So I don&amp;#39;t think the text in your graphic is blurry; it&amp;#39;s perfectly rendered.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;Comic Sans MS appears to have a certain jagged quality designed into it.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;font face="Arial" size="2"&gt;The only suggestion I have is experiment with some kind of colored outline or border on the text.&amp;nbsp;&amp;nbsp;It might soften the boundaries between your white text and its dark background.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;For smoother boundaries I think you&amp;#39;d have to turn to a different graphics tool.&amp;nbsp; But I don&amp;#39;t have any suggestions for better alternatives.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;HTH&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;Good luck!&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class="453102901-06052008"&gt;&lt;font face="Arial" size="2"&gt;Rick&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2339136.aspx</link><pubDate>Tue, 06 May 2008 00:20:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2339136</guid><dc:creator>geosync</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2339136.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2339136</wfw:commentRss><description>&lt;p&gt;I don&amp;#39;t see anything unusual in this code.&amp;nbsp; Could you email a copy of your graphic with blurry text? &lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2339116.aspx</link><pubDate>Mon, 05 May 2008 23:55:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2339116</guid><dc:creator>ahmedilyas</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2339116.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2339116</wfw:commentRss><description>&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Image&lt;/font&gt;&lt;font size="2"&gt; b = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Bitmap&lt;/font&gt;&lt;font size="2"&gt;.FromFile(images[randomNumber]))&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Graphics&lt;/font&gt;&lt;font size="2"&gt; g = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Graphics&lt;/font&gt;&lt;font size="2"&gt;.FromImage(b))&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;g.SmoothingMode = System.Drawing.Drawing2D.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;SmoothingMode&lt;/font&gt;&lt;font size="2"&gt;.AntiAlias;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;g.DrawString(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Because I had to!&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Font&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Comic Sans MS&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, 30, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;FontStyle&lt;/font&gt;&lt;font size="2"&gt;.Bold), &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Brushes&lt;/font&gt;&lt;font size="2"&gt;.White, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;PointF&lt;/font&gt;&lt;font size="2"&gt;(290, 10));&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;b.Save(path + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;\\newone.jpg&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;b.Dispose();&lt;/p&gt;
&lt;p&gt;g.Dispose();&lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2339107.aspx</link><pubDate>Mon, 05 May 2008 23:49:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2339107</guid><dc:creator>geosync</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2339107.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2339107</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;ahmedilyas:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;when adding text, the text is the only thing that is blurry&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;We better look at your code...&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2338007.aspx</link><pubDate>Mon, 05 May 2008 13:19:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2338007</guid><dc:creator>ahmedilyas</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2338007.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2338007</wfw:commentRss><description>&lt;p&gt;Thanks but I don&amp;#39;t mean watermarking :)&lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2337987.aspx</link><pubDate>Mon, 05 May 2008 13:13:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2337987</guid><dc:creator>blink18jew</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2337987.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2337987</wfw:commentRss><description>if you mean watermarking an image with text have a look at :
&lt;br /&gt;&lt;br /&gt;
http://www.codeproject.com/KB/GDI-plus/watermark.aspx
&lt;br /&gt;&lt;br /&gt;
really helped me with my watermark issues, Si!</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2337465.aspx</link><pubDate>Mon, 05 May 2008 08:59:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2337465</guid><dc:creator>ahmedilyas</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2337465.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2337465</wfw:commentRss><description>&lt;p&gt;well not quite. The image is fine, crystal clear... but when adding text, the text is the only thing that is blurry. &lt;/p&gt;</description></item><item><title>Re: drawing text on graphics</title><link>http://forums.asp.net/thread/2337270.aspx</link><pubDate>Mon, 05 May 2008 06:52:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2337270</guid><dc:creator>geosync</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2337270.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2337270</wfw:commentRss><description>&lt;p&gt;When I see blurry text in a graphic sometimes it&amp;#39;s because image is not displayed at exact image&amp;nbsp;size.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;For example, if image size is 100 x 100, but you display it as 105 x 105, text will blur.&lt;/p&gt;
&lt;p&gt;HTH&lt;/p&gt;</description></item><item><title>drawing text on graphics</title><link>http://forums.asp.net/thread/2335994.aspx</link><pubDate>Sat, 03 May 2008 23:57:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2335994</guid><dc:creator>ahmedilyas</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2335994.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=2335994</wfw:commentRss><description>&lt;p&gt;I know how to draw text on graphics and all thats fine however I do have a couple of questions&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) the text comes out blurry on jpg images. Any ideas on how to make it clearer and smooth? &lt;/p&gt;
&lt;p&gt;2) what font can you recommend that I can use which looks good, the font color I will be using is white since the images are generally dark. I just can&amp;#39;t seem to find a font I am attracted to.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item></channel></rss>