Solved

SharpDX - annotation

Posted on 2012-04-12
5
389 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

622 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