Blog


Updating

Moved the Stretch/Sharpen/Unsharp mask options onto the tab with the output text and – get this – it now works in real time. I.e. uncheck the Sharpen option, and you’ll instantly see the output image without sharpening applied. It’s pretty sexy.

Also, playing around with the unsharp mask and blurring multiple times seems to improve the output a lot. I’m still trying to work out just how many times is best (maybe have that as an option…?)


Update

The problem with the new conversion code has been fixed and the output is looking very nice. If I could have found it before spending several days porting the original code it would have been even better.

Finished the code to apply 3×3 convolution matrices to the output image, and replaced the old sharpening code with a matrix. Eventually the user will be able to enter a custom matrix to be used (i.e. for blurring/alternate sharpening/edge detection/mean removal etc). I’ve also got an unsharpening mask working, but it’s a little disappointing (2xoriginal – blurred, right?).

Aside from that, there’s lots of little things done that are hardly worth mentioning (drag drop image onto the form/executable, resizeable form so you can go full screen or use it in 800×600 mode, validation…)


Update

Finally got .NET working properly again, but I’ve been a little distracted setting myself up a Linux server on a spare computer. I had a quick go at running ASCGEN using Mono, and I think that I’ll be able to get it working after a couple of more days banging my head against the monitor. Fingers crossed, and we’ll cross platform support right from the start.

Anyway, program-wise I’ve changed the GUI layout (again), and I’m getting to the stage where I’m more or less happy with the design.


Worst update so far

Today’s Ascii Generator programming time was partly spent trying to work out why the .NET Wizard would let me create any type of new project except for the new C# Windows Application project I wanted, and the rest was spent reinstalling .NET.

In summary – AscgendotNet status: unchanged. Current book I’m reading status: ahead of schedule.


Update

The new picturebox is nearly finished. Just need to add in one more thing which will greatly increase the drawing speed for large images.
FXCop compliance is just about done so the code is nice and tight.
As a bonus it’s forced me to add the framework for localization. Once the program is far enough along it’ll be easy to add other languages.
Enabled XP styles, so the program looks all nice and fancy.

To do next:
Port the conversion code.
Selection of an area of the image – Will probably add it into the new PictureBox control.
Come up with a better way for the user to change brightness/contrast values. Probably writing a custom version of the vertical scroll bars to add the current value and display it with some nice graphics.
Removal of FormText and redesign of the main form to add the converted text onto a new tab.


I suck at blogging

I really do. Work on the new Ascgen took a break, but I’ve started up again and I’ll try and keep this updated.

Current goals:

    Inherited version of the PictureBox class, adding brightness, contrast, interpolation mode, load, and some other things that Microsoft should have put in before they ever released it. (Nearly complete)
    FXCop compliance. (Almost)
    Porting over the original conversion code
    Working out an accurate way to get the dimensions of a character when displayed in a font. 😐

Answers to common questions:

    Versions for other operating systems will hopefully be available through the Mono project
    Colour pictures would require a totally different approach, and probably won’t be added. With the pictures the Ascgen produces each character represents a different gray colour without needing any extra processing. For colour images, each character is set to a colour with html/rtf/etc and the character itself is irrelevant.
    This will probably go open source when it’s at a stable working build. Until then, please don’t ask for the code.

😕 I’ll think of more later…


Current Status

Just to be clear, this is very early on in development so don’t expect anything soon.

The ASCII conversion engine is in, but I’ve run some tests and I’m not happy with the output. It’s OK, but when compared to the old version using the same ASCII ramp and settings, the output from the old program is just a little bit better, probably due to how Graphics.DrawImage resizes the picture. If I can’t work out how to improve it I’ll rewrite the old code using unsafe{}, which is something I wanted to avoid.

When that’s done, I’ve got an idea about how to improve the sharpening, which will either work really well or not make much of a difference.

So currently: you can load an image, choose the font, adjust Brightness/Contrast, convert with stretching and sharpening, then save the output as text.


First Post!…

A couple of years after abandoning the ASCII Generator I’m back working on a new image to text converter. The old version still works, but it’s so big, bloated and ugly that I’m no longer able to work on it (and I don’t even have a copy of C++Builder any more). A few months ago I finally was able to retrieve my old jmsoftware.co.uk domain name, and purchased some web space in a really nice deal from Hytek Hosting and moved the old site over.

After abandoning another project I was working on (don’t ask), I decided to go back to my roots and see how feasible it would be to port the ASCGEN over, and the answer was ‘not very’. But… I did run some tests and not only managed to rewrite the conversion engine in C#, but it was faster and smaller.

So, I decided to rewrite the ASCII Generator in Microsoft Visual C#.NET. The main reasons for this are that the development time is fast, and I need to learn it. The main drawback is that you’ll need the .NET Framework installed (one day it’ll come as standard in Windows and this won’t be an issue), but this will be a one time ~20Mb install and then the exe files will be tiny. I’m not going to just replicate the old program (which grew into a really weird text editor), this will be a slimmed down SDI application with just the important features.

This will be a development journal only, so don’t expect any live journal style attention whoring. I’ll get around to fixing the design of this blog soon.

The first version of the program will not be released until it’s ready, and it produces a better output then the old program.