Solved

SharpDX - annotation

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now