Solved

SharpDX - annotation

Posted on 2012-04-12
5
383 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:knowlton
  • 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: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:knowlton
ID: 37842751
I will keep you posted on my progress!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display

856 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