Question

Draw Blurred Text

Asked by: kapot

Hi,

Anyone know how to draw blurred text on top of an image?

Normally, we use function like "TextOut()" for drawing text. However, I need blur effect.

Thanks.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-07-29 at 15:47:30ID23605806
Topic

Delphi Programming

Participating Experts
6
Points
350
Comments
38

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Blurred Images using PictureClip
    Hello all, see if you can help me out with my problem here... I load a bitmap into the PictureClip control, and then take parts of the bitmap and display them in various Images, like so: PictureClip1.Picture = LoadPicture(CommonDialog.filename) PictureClip1.ClipX = 0 Pictur...
  2. Actionscript fade & blur image transition effect
    Any advice on how to set up a fade & blur image transition like this : http://www.templatemonster.com/website-templates/6281.html Thanks.
  3. Blurred screen
    My rather new computer screen has been working fine since I bought it three months ago. However, last week all of a sudden the pictures and the words became blurred or not focused/doubled. Does somebody have an explanation what could have happened? Many thanks in advance. Pe...
  4. Dynamic Javascript Blur Effect
    Hi I am looking for a dynamic javascript blur effect to apply to a full screen image, which i will be able to controll when its applied. Has anyone got any advice. Many thanks -s-
  5. mootools (or similar) blur effect on background image
    Hi I really need to find a way to apply a blur to background images using any method possible. I need to be able to call and apply the blur/pixelatted effect from within a function, the background image will be contained within a div. Please say its possible, anything i ha...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: SteveBayPosted on 2008-07-29 at 18:46:11ID: 22117011

I would look for a Blurred Font.

 

by: SteveBayPosted on 2008-07-29 at 18:56:09ID: 22117056

 

by: kapotPosted on 2008-07-29 at 23:50:07ID: 22117965

SteveBay,

I am sorry that I am not looking for fonts.

 

by: kapotPosted on 2008-07-29 at 23:51:52ID: 22117970

ThievingSix,

Yes, I looked into that code but that is not what I am looking for, because it does not apply specifically on text drawing.

 

by: MerijnBPosted on 2008-07-30 at 00:45:15ID: 22118204

kapot,

I don't think you can do this directly. You probably want to draw the text on a seperate layer (using GR32: http://graphics32.org/wiki/), blur that, and then merge that layer with the image layer you want the text to be on.

 

by: developmentguruPosted on 2008-07-30 at 05:49:12ID: 22119840

Another approach would be to use windows paths.  You can start a path, then stroke text in an existing font to that path.  Once you close the path you have the ability to do many unique things with it.  You can do outline letters simply by telling it to stroke the path.  For your purposes you would need to walk the path, and at each point do  blur effect.  this could involve simply setting pixels around the point, or other shading techniques.  That portion would be up to your own experimentation.  This MSDN article shows the StrokePath function and it is easy to see all of the path functions from there.

http://msdn.microsoft.com/en-us/library/ms535180(VS.85).aspx

 

by: kapotPosted on 2008-07-31 at 03:04:55ID: 22128228

There is also no commercial VCL that can do this?

 

by: developmentguruPosted on 2008-07-31 at 05:01:41ID: 22128831

Not that I have seen.

 

by: aikimarkPosted on 2008-08-01 at 13:55:39ID: 22141896

Can you use grey font color, rather than the default black?

One way to accomplish this is to mimic the shaded effect.  Since you want to blur this text, you will need at least 8 additional text-to-canvas operations.  What you do is to output your main text and then ouput the same text in a light grey font color in the -1 and +1 pixel positions in both the X and Y coordinates.

 

by: CodedKPosted on 2008-10-07 at 00:53:26ID: 22657244

 

by: kapotPosted on 2009-02-25 at 02:34:57ID: 23732115

CodedK, thats not what I want. Bitmap font is limited, you cant choose fonts that are available in the system.

It seems there is no solution provided after quite sometimes.

So, I am giving up.

This question should be closed.

 

by: MerijnBPosted on 2009-02-25 at 03:40:53ID: 23732475

Did you ever try my suggestion?

 

by: aikimarkPosted on 2009-02-25 at 04:48:18ID: 23732985

Did you try my suggestion?

 

by: aikimarkPosted on 2009-02-25 at 04:49:51ID: 23732998

I object to the close request.

 

by: aikimarkPosted on 2009-02-25 at 10:33:14ID: 23736739

I would like to work with kapot to help him get a solution to his problem.  It had been quite a while since I thought about this that I considered it abandoned.  
_______________________________
@kapot
If you still need a solution, then start by trying the suggestions of both MerijnB and me.

 

by: kapotPosted on 2009-03-01 at 03:13:13ID: 23767731

aikimark,

MerijnB said that this could not be done directly and indeed. I dont like his solution because it involves drawing in other layer then merge it, which is beyond the scope of this task. Why I dont want layer, because I must take care of other drawing functions in my application.

I simply need a text drawing function that could draw blurred text, thats it.

For example, you got an image or a canvas ... then draw blurred text on top of it with a simple function call.

And I cant figure out your suggestion with grey color satisfy my requirement.

Why I want this blurred text? Because I will use it as "realistic" drop shadow.

This are my reasoning that none of the suggested solutions give answer to  this questions.

And I am giving up.

 

by: aikimarkPosted on 2009-03-01 at 04:29:06ID: 23767931

@kapot

"And I cant figure out your suggestion with grey color satisfy my requirement"

Did you try my suggestion?

The offset double-printing of characters is EXACTLY how drop shadow is done.  The grey shadow is first printed one l pixel to the right and 1 pixel below the 'real' character's position.  Then the real character is printed in black in the correct position.

==========================
However, you asked for 'blurred text', which is VERY different than drop shadow.  You are at the point of quitting while MerijnB and I are just now discovering your true requirements.  That is why I objected to closing this question.

 

by: kapotPosted on 2009-03-01 at 13:55:01ID: 23769926

aikimark,

Please ... read my original question.

I asked about how to draw BLURRED TEXT.

Dont you understand what I am asking here?

BLURRED TEXT drawing method.

That's all I am asking.

And none of you provided any solution.

Or am I missing something here?

It does not matter for what purpose I will use that blurred text LATER, that is not what I am asking here.

Speaking about drop shadow. YES, I do understand your info about first printed one pixel down and right. Even though, thats not realistic drop shadow like I want to achieve LATER with this blurred text.

If you dont know what is realistic drop shadow, please see the attached image. That drop shadow could NOT be achieved with your grey text and offset double-printing.

Stick to what the question is ...

 

by: aikimarkPosted on 2009-03-01 at 14:37:54ID: 23770150

@kapot

What we (experts) are missing is an example of what you MEAN by blurred text.  Please post an example like you did of the drop shadow letter above.

If you consider just the shadow part of the above combination to be a blurred text (which it is), then you can most certainly use the technique I originally described to achieve it.  Consider the central character to be a dark grey.  There are printings of the same (dark grey) charater to the left, right, above and below with lighter shades of grey.

Since you indicated you are an advanced Delphi developer, I assume you understand the purpose of the first two parameters of the TextOut method.  

 

by: MerijnBPosted on 2009-03-02 at 03:14:40ID: 23773049

I've made a demo which does drop down shadows, take a look and let me know if you're interested. I'll post a line to EE-stuff after this post.

 

by: MerijnBPosted on 2009-03-02 at 03:17:28ID: 23773066

For some reason ee-stuff doesn't update the Q, so you can find the file here http://www.ee-stuff.com/Expert/Upload/getFile.php?fid=7546

 

by: aikimarkPosted on 2009-03-02 at 06:30:55ID: 23774237

@MerijnB

What a neat little demo applet.  Is there a way to omit the main text and just draw the shadow?  This might help kapot clarify his requirements.

 

by: MerijnBPosted on 2009-03-02 at 06:33:20ID: 23774260

@aikimark

Don't know yet, let's wait what kapot says at first, maybe the total is enough already.

 

by: aikimarkPosted on 2009-03-02 at 06:46:36ID: 23774372

@MerijnB

What method(s) did you use to blur the text?

 

by: kapotPosted on 2009-03-02 at 07:05:23ID: 23774534

Wonderful!

MerijnB, that's exactly what I am looking for.

What I am referring as blurred text is the shadow part.

By the way, take a look into the "p" part ... you should see that the bottom of the leg is not blurred :)

So, will you share the code? :)

 

by: MerijnBPosted on 2009-03-02 at 07:05:46ID: 23774538

I used an addon from G32.

 

by: MerijnBPosted on 2009-03-02 at 07:06:43ID: 23774543

> So, will you share the code? :)

Sure, but is this as a whole good, or do you still want _only_ the blurred text part?

 

by: kapotPosted on 2009-03-02 at 07:30:48ID: 23774787

MerijnB,

The whole good.

I have G32 installed, but not sure with the add-on you mentioned.

I increased the point for this question.

 

by: aikimarkPosted on 2009-03-02 at 07:31:21ID: 23774794

I need to learn more about G32.  I thought it was mostly for fast graphics and tricks.  I didn't realize it could do tricks with text as well.  Thanks.

Your solution is probably simpler and almost certainly faster and offers kapot more options.

 

by: MerijnBPosted on 2009-03-02 at 11:33:05ID: 23777283

Here you can download it all: http://www.ee-stuff.com/Expert/Upload/getFile.php?fid=7548

One more hint: next time you're looking for a drop shadow, at least say so in your question. For me, 'drop shadow' triggers a whole different thing in my head than 'blurry text'. I understand you can make the first from the latter, but in this case, 'blurry text' just didn't do it for me :)

Have fun with it.

 

by: kapotPosted on 2009-03-03 at 04:13:32ID: 23782965

Hi MerijnB,

It works :) It took me sometimes to figure out how to install that GR32ex, but it works fine.

To others, here is the home of GR32ex:

http://code.google.com/p/gr32ex/

 

by: kapotPosted on 2009-03-03 at 04:14:09ID: 23782969

Oh yeah, I did not think that general Blurred Text could cause confusion :)

 

by: kapotPosted on 2009-03-03 at 04:14:55ID: 31481435

Very good solution. Example project is provided and easy to understand.

 

by: MerijnBPosted on 2009-03-03 at 04:16:30ID: 23782982

Please be aware that for the code I sent you do not have to install either GR32 or GR32ex.

 

by: kapotPosted on 2009-03-03 at 04:43:51ID: 23783139

MerijnB,

Yes, I noticed that. I dont use GR32 nor GR32ex from your code zip file.

I use the official one (GR32 and GR32ex).

Patched the GR32.

Do not install using GR32ex packages, just setup the Library Path.

Rebuild all projects.

Done.

 

by: aikimarkPosted on 2009-03-03 at 06:31:04ID: 23784041

When I first read this question, I thought you were building a security system to deter electronic monitor snoopers.  Many years ago, I read of an analysis of EM signals emitted by CRT monitors.  The cause was the clear spike at the border between the white background and the edge of the black letters.  Blurring the text meant that there was some 'ramp-up' and 'ramp-down' to either side of the black letters.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...