Solved

SharpDX - annotation

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copy/Clone an object. 9 30
Need help on C# Linq query on object 6 53
Please explain "Multi-Tenant Services" 5 64
Resolve Dependency Issues 4 47
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

14 Experts available now in Live!

Get 1:1 Help Now