Click here to Skip to main content
15,881,173 members
Articles / Programming Languages / C#
Article

Album Surfer

Rate me:
Please Sign up or sign in to vote.
3.83/5 (3 votes)
19 Jun 20054 min read 50.3K   469   23   7
An app for easy image scrolling.

Image 1

Introduction

On numerous occasions the Code Project website has provided ideas and examples of techniques to solve a problem that otherwise I was having difficulty with. To all those who operate and contribute to Code Project I say thank you.

As a way of possibly giving back a little I offer this professionally complete application for surfing through image collections, also known as albums. This application combines many ideas found else where on Code Project site but it also includes my view of what constitutes the minimum aspects of a professional application. I fully understand that this is a subjective concept and the beauty is in the mind of the beholder. Software development is a combination of a set of finite rules and creativity. The creativity provides many solutions to the same problem. After years of experience in the industry I believe there are characteristics that permit one to label a solution as a "good" one.

Characteristics of a professional application

  1. It must provide the user an intuitive interface and perform the task the user needs to do in an easy to understand fashion.
  2. It must be complete, that is it would include a polished looking splash screen, an easy to use parameter modification interface, an informative About Form and a complete help implementation.
  3. From a development point of view it should be consistent in style and be written and documented in such a way that another developer can understand and maintain it. This would be without spending months to figure it out.

That's my view of software beauty and I am sticking to it.

This application includes all the items listed above. After using it for a month or so it is exactly what I wanted, hopefully you will find it useful. It employs all the natural image types that .NET 1.1 knows about and really performs nicely given the amount of code written to solve the task.

A couple of functions have to reach outside of .NET to provide the features that were needed and you will see their references in the Win32dll class.

As a C# application all XML comments are complete and I have provided an IDE macro file that provides formatting of function signatures as they are in the example code. The output of an NDoc execution is also provided as an example.

Feature list

Basically when the user selects a graphics file to view, this application checks the directory of which it is a member and makes a list of all other graphics files in that directory for selecting through.

Image 2

The project incorporates the following features:

  1. Ability to select the image, zoom and scroll with key presses only. I have become partial to the mouse wheel for image selection.
  2. Drag and drop a new file to the form to switch directories and file lists.
  3. Select an area from any displayed zoomed image and save as a new file in any supported image format including selecting JPEG quality.
  4. Persistence of user selections for the next execution. Use of registry or local XML file is a developer option.
  5. Display the image properties.
  6. A complete HTML help project to support the application.
  7. A full deployment project.

Author background

I have been in the software profession for many years which includes stints as a college instructor and as a group manager. As you might assume I have formed some strong opinions about what represents a job well done. This project exhibits what I think is the best in style and form. Over the years I have on many occasions reviewed other people's code searching for style and techniques that can make my own code better. I have come to understand that there is great elegance in simplicity. In fact, sometimes the hardest thing you can ever do is factor a problem into its constituent parts to provide the simplest yet complete solution.

I am an unabashed fan of Hungarian notation and try to structure a line of code so that just viewing it, without the aid of an IDE to tell scope type and function, is adequate to understand what it is attempting to do.

I use the major parts of this application as the basis for every new application I write. Why reinvent the wheel?

Points of interest

The whole project from the beginning to end took about two months figuring out this and that. Hopefully you will save some time if you find it useful.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here



Comments and Discussions

 
Generalthanks Pin
pascualini28-Jun-06 14:00
pascualini28-Jun-06 14:00 
GeneralPossible option: Graphics.InterpolationMode Pin
FTrader16-Sep-05 20:27
FTrader16-Sep-05 20:27 
GeneralCorrect Links Pin
Zephyrer20-Jun-05 15:30
professionalZephyrer20-Jun-05 15:30 
After testing, I found the correct links:

the image: http://www.codeproject.com/useritems/Album_Surfer/Article1.jpg[^]

Project Source & Installer: http://www.codeproject.com/useritems/Album_Surfer/AlbumSurfer.zip

Note: the source and installer are packed together.

Executable: http://www.codeproject.com/useritems/Album_Surfer/App.zip
GeneralRe: Correct Links Pin
Michael Dillmann20-Jun-05 23:55
Michael Dillmann20-Jun-05 23:55 
GeneralRe: Correct Links Pin
Mel Shaline21-Jun-05 14:48
Mel Shaline21-Jun-05 14:48 
GeneralAll links defective Pin
fwsouthern19-Jun-05 18:24
fwsouthern19-Jun-05 18:24 
GeneralNot able to view the Image Pin
Gaurang Desai19-Jun-05 18:10
Gaurang Desai19-Jun-05 18:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.