Solved

SharpDX - annotation

Posted on 2012-04-12
5
385 Views
Last Modified: 2012-04-13
Using SharpDX (a library which gives C# programmers the ability to access DirectX libraries in a managed environment) how would I perform an annotation on an image?

I want to keep the original image just as it was and just add some text to the upper left corner of the image, then save-off the image combined with the annotation.

This is all happening in a console app -- no GUI, no windows forms -- all in a process sight unseen.

Thank you!
0
Comment
Question by:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37842609
Tom,

Let me first say that I have no idea how to achieve that effect, but I am intrigued by SharpDX (since I have never heard of it).

I downloaded the binaries, and I am looking at the samples.  If you have any insight to ramp this up to the next level, I would be happy to help.

Bob
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 37842644
I see code in the Samples\Direct2D1\BitmapApp folder (Program.cs) that looks like it just loads a Bitmap from a file:

public static Bitmap LoadFromFile(RenderTarget renderTarget, string file)

If you have a System.Drawing.Bitmap object, you can create a System.Drawing.Graphics object from the Bitmap, and use the DrawString method to annotate the image.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 37842716
I am abandoning the SharpDX solution.

I am focusing on optimizing the PixTools library code instead.

I think the Direct2D / SharpDX takes the project in the wrong direction.

I don't even know if SharpDX or Direct2D would even FUNCTION in a console app, which this is.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37842740
Hey, good luck with PixTools.  It has been a while since I have thought about image processing, and I haven't heard of PixTools either.  I like to keep in touch with my past lives!!
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 37842751
I will keep you posted on my progress!
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question