Tuesday, July 31, 2007

Workarounds...

Yesterday I checked why the Forte Agent news reader didn't launch ImageViewer correctly as an external image viewing application.

I found that they don't enclose the filename with "" when passing it to my program so if the filename contained spaces they pass it as multiple arguments. I went ahead and submitted a bug report but after 24h I didn't hear anything but robot talk from them so I went ahead and added a few lines that check for this case - from now on (2.43) - when running ImageViewer from command line or via similar customization possibilities in other programs the issue should be magically resolved by the ImageViewer itself :)

Just don't push it too much - I just add a single space between the arguments - if you want multiple spaces next to each other in a filename please contact the software vendor to add those ""'s... - that's what they should have been doing in the first place ;)

Sunday, July 22, 2007

Auto updates

Yup... it's here at last - I implemented an auto update mechanism that with a single mouse click will take your current ImageViewer executable and replace it with the newest version available.

The auto update first downloads a simple "bootstrapping" executable into your temp directory, that executable is then instructed to download the latest version of ImageViewer, kill the currently running instance of the previous version, replace the executable files and... reopen ImageViewer on the exact document that you've been watching before the update - should work out well imho but if you feel the process could be improved please let me know.

The bad part is you can't check it out yet - but once you install the 2.4 version manually - it should be the last manual install you ever do.

ps. I've also created a skeleton of a web page for ImageViewer, let me know what you think. It's running Drupal and at least for now it's working really well so I can recommend that to anyone needing a simple CMS system.

Monday, July 16, 2007

Sepia, undo, progress indicator and some bugfixes


I used a couple "night-time" hours to implement a nifty progress meter that will be useful when browsing through a directory to know how far down the road you currently are - should help you decide if you have time to watch all those photos right "now" :).

I also added a very simple undo mechanism, a sepia filter and fixed a few bugs.

As it seems I manage to find some time for ImageViewer after all I'll try to schedule some simple auto update feature now so that keeping up with all those "daily versions" is easier for all of you ;)

Sunday, July 15, 2007

Histograms added

To be true I started doing it yesterday and stopped around 1 am. After a few hours of minor tweaking today...



ImageViewer has a nice linear histogram option available, I also removed most of the flicker when images were redrawn using the CMemDC wrapper class.

Let me know if you feel there's a need for a logarithmic histogram.

ps. The image used is copyright Tomasz Jakobiec :)

pps. I also added a gray scale conversion filter today - looks like sepia and others may be on their way - along with some simple undo mechanism ;)

Saturday, July 14, 2007

Background image precaching added - finaly :)

I managed to implement background image pre-caching today - something I really wanted to do for a long time but didn't get to it for one reason or the other. From today on though, once you start navigating in a given direction ImageViewer will start loading some images in the background so that the next time you press "next" the image will show up instantly - give it a try :)

I'll also try to add image histograms in a few days.

Wednesday, July 11, 2007

...what You can do...

I managed to create my first CodeProject article yesterday that hopefully will help others avoid some problems I had with the performance of accessing pixel information through the CImage ATL class.

In the article I describe how to use a very simple helper class to get instant orders of magnitude speedups in existing and new applications using GetPixel and SetPixel methods.

Think how many small but very useful pieces of code you have in your "backups" - maybe they could save someone a day or two? Sharing your work is easy - give it a try!

Monday, July 9, 2007

The one person makes a difference thing

As I already mentioned I did a bit of cleaning thanks to a friend of mine and the program really became usable.

Since then I did a few other minor tweaks that make it even more usable - in fact I got so motivated that I even did a feature my girl asked for 2 years ago... seems it's the "not so close" friends that motivate me the most (let me know what YOU think).

I went ahead and refactored the file navigation mechanisms which now allow file deletion to happen in any possible way and still properly move you to the correct image which was an issue before (how it came to that is a total mistery to me ;) ).

Yes... There's a delete icon present on the toolbar at last...

I also noticed the "image to text" ratio here is quite low so here goes - the first screenshot of ImageViewer on the net!

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 ;)