Saturday, June 30, 2007

ImageViewer premiere :)

I finally decided to give my secret image viewing program to a wider audience - it's called... ImageViewer ;)

I didn't do it before as it's really not "comparable" to all those "all inclusive" solutions - it's main role is to be fast, useful and intuitive so that you can browse through a set of pictures fast or create pictures for on-line auctions easily (EXACT image size preview during resize!).

The main reason to write it was that back in 2003 at Aldec we created visualizations of internal data structures using GraphViz tools that needed a nice viewer to look at them - none of the available ones met the challenge then but I had most of the code waiting in my previous projects... did some image related stuff during my studies.

ImageViewer comes up in zoom mode by default - just click any place on the image with the left mouse button and it will zoom-in - use the right and it will zoom-out - it will zoom-in and out on the area you pointed - these two operations are the most important features of the program ;).

The Escape key exits the program - no confirmation.

Want to see two images at the same time? Open up one - zoom-out a bit - use the "optimal size" option and do the same with the other.

It also has a mechanism which let's you create special files describing the images thanks to which clicking on something in the image may trigger system commands and for example - open a different image - this way if you visualize something using ImageViewer it's easy to traverse between different levels of detail or levels of hierarchy.

It also has basic vector image support through the .dot file standard - but note the word basic here please :).

There's also has a very basic bad pixel detection mechanism - just create a full black picture by shooting without opening the lens cover - open the picture in ImageViewer and run "Detect bad-pixels" - you can do the same with all single color pictures (white, red, green etc) . I hope you don't find anything.

One of the reasons I didn't show it earlier was that I didn't mind the terrible pixel access performance of Get/SetPixel in the CImage class but lately a friend of mine has motivated me to fix it and so I did - now rotating/analyzing the image is really fast and I hope I won't be embarrassed at least with this part of the project :). To speed pixel access up I used some code samples from the Bitmap usage extension library. It did have at least one bug I found and was not usefull directly to me but was a great start - I'll try to publish my code sometime soon on CodeProject so it doesen't get lost :)

There's no installer yet, no "associate with xxx" etc but if you use open with and tell it to always use ImageViewer it will work.

I use avast on my machine so the exe should be clean.

If you find issues with the program (for example something not working with your image) please let me know (and attach the image if possible) - I'll surely try to do something about it.

I've successfully used it under Linux using wine.

The program is free for personal use - even if you use it at work - it's the use not the place that matters :).

I'll probably explain some of the more unique features with examples in following posts - stay tuned but don't expect daily updates - I try to have a life despite my day-job and the general computer addiction ;)