Mapping keystrokes to images in C# - c#

I was hoping to get some guidance on a project that I'm not even sure can work. I want to write an application in C# that allows me to type with my keyboard, but what shows up on the screen is a specific image from an image bank. So, I'll have a few images stored, and I'd like to map each keystroke from my keyboard to a stored image. Is something like this possible?
If not, is it possible to write some sort of library that I can import into MS Word, which would do something similar for me?

I created a new font with http://fontstruct.com . It's pretty straight forward to use. Once you've made your font, you can download it as a true type font, and install it to your computer.
Thanks for the help!

Related

How Can I read the Aruco Markers in a a bitmap image in C#?

I have a bitmap image of multiple aruco markers. I need to just output the number of markers that can be read from the image.
I have looked all over, but am not able to find a good way to do this in C#. I know this can be done in C++, but can it be done in C#?
Does anyone have any ideas as to how to do this? Is this a supported function in visual studio?
I attached an example of an image I want to be able to read the aruco markers from. I know I will not be able to read all of them, but I want to be able to read as many as possible.
Have you tried paying attention to https://bitbucket.org/horizongir/aruco.net project? It looks like exactly what you are looking for.

Save image from camera (live image)

For my final project in school ( even though I'm not a programmer ) I have to make a program that reads barcodes. I have to use Common Vision Blox.
I got a live feedback from the camera and I'm able to snap it.
But I want to save this picture now, I tried using this method (Saving image to file), but there seems to be a fault. Probably because I don't actually know which reference to use. I'll add my program in pictures.
I would like to save the snap in JPEG or something, so that I call it further in the program to start the barcode recognition.
Hope you guys can help, thanks in advance!
The solution is actually quite simple: The object axCVimage1 has a method Save() and a method SaveImageByDialog(). Use whatever method suits your needs. For saving the current image to a jpg file, simply provide a file name that has the extension 'jpg'. If you need control over the compression ratio and quality, use the the method SaveLossyImage() instead.

TIFF image prints fuzzy (but works fine from Paint.Net)

I have created a TIFF image from several lines of text, and it's quite large at 300DPI. The image itself looks pretty good. The font is set as followings when drawing the string to the image:
drawing.SmoothingMode = SmoothingMode.Default;
drawing.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
When I print the image, the text comes out fuzzy (I'm printing to a low-rez printer). But, if I take the exact same image and print it from Paint.NET, it prints beautifully. The difference is that when I hit Print in Paint.NET, it asks me if it should sharpen the image for printing -- when I say yes, that's when it works.
My question is what the heck is Paint.NET doing to sharpen the image and how do I mimic that? I will post some code later tonight to assist with an answer, if anyone has an answer.
Thanks!!
There is a .NET C# library called AForge.NET. It has many components and one of these components is an imaging library that does, indeed, have a sharpen filter (among many other types of filter). You can download the library here: http://code.google.com/p/aforge/
And if you need help on how to use it, look here: http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx

how to disable copying a picture from excel

I have sucessfully inserted image to excel sheet.Now i should not allow the picture to be copied by anyone. how can i achieve this?
any idea.
thanks in advance.
You can't.
Of course, there are certain measures you could employ, but there are always ways around them. You could (somehow) disable copy & paste within Excel, but then the user could take a screenshot (Alt-PrtScn) and crop it in an image editor.
If you somehow disable the ability to take a screenshot, they may feed the monitor output of their machine to another machine with a screen grabber, and get the image that way.
Or, of course, accepting the loss of quality, they could point a camera at their screen and get it that way.
If your excel file is accessible by anyone, then you can't.
You can only shrink the images to low resolution or putting watermark on it.
Depending on your environment and audience (eg, an internal document in your company), Office IRM can prevent the document from being copied and even copied using print-screen.
Personally, I see these attempts as naive at best - the data can be easily copied anyway (for example by taking a photo of the screen), but it sends the right message to your colleagues.

How to draw a table with C#?

I need to draw a table of data into a vector image with C#. I'm looking a library or component that helps me to draw the table without having to care about its layout myself.
All I'd like to care about is what data belongs into which cell.
I already know of some libraries that allow me to create vector images with C# (e.g. SharpVectorGraphics/SvgNet for SVG images), but I can't find anything that helps me with the table.
Question
Does anybody know of a library or component that can do this? It doesn't have to be free if it does the job well. The vector image should have a format that can be displayed by a standard installation of Microsoft PowerPoint and Word.
Question #2:
Does anybody know a way to render (an) HTML (table) to an image with C#?
You could use aspose; if no one else comes up with a better solution for you. It would do as you ask, but it doesn't "feel" like a good solution!
Create a Word Document in memory
Add a Table
Populate that table
Export to an Image.
Hopefully someone comes up with something better! :(
I can think of 2 ways of solving this.
Drawing:
You can littery draw your table and content using C#, this way would off course be a large investment in time but would proberbly be the fastest and most profensional way of doing it.
Print to picture
A bit simular to what others have suggested, make the HTML code for what you want, and throw it into a WebBrowser Consol. Then do a print preview to a bitmap.

Categories