Click here to Skip to main content
11,642,216 members (59,397 online)
Click here to Skip to main content

LightBox Web Gallery Generator

, 7 Oct 2007 CPOL 178.7K 1.7K 91
Rate this:
Please Sign up or sign in to vote.
A program to generate HTML Web Gallery based on the LightBox JS

Introduction

LightBox Web Gallery Generator is a small .NET Windows Application that given a folder with images outputs HTML Web Gallery based on the LightBox JS.

Considering that Lightbox Web Gallery Generator has a tiny size and runs without installation, you can download it, run it and have your first gallery ready in a matter of seconds.

Background

I am usually successful at fighting the desire to write a program for each and every task myself. But couple of years ago, I found that none of the existing off-the-shelf packages address my needs. I wanted a very straightforward tool that would allow me to share my photos in a couple of clicks. I needed presentation with maximum screen space dedicated to photo with minimum text. Also I wanted the gallery to serve as a backup and store the original photos along with resized versions.

Online services had gallery images too small for my taste. Dozens of programs I have tested produced galleries just too ugly for me. Almost none could serve original photos. Very few had clean HTML or gave control over CSS. All required numerous clicks to get where I wanted. So to do it right, I had no choice but to do it myself.

The first version created index (thumbnails) page and individual pages for each photo. You can still find this original version here. But once LightBox JS by Lokesh Dhakar gained momentum, I have dumped most of the code in favor of LightBox. The program became more like an add-on to LightBox than an original program, but the result is very pleasing and that's what counts.

Using the Program

When you start the program, you are presented with this screen:

Choose a source folder with *.jpg images, hit "Create web gallery" and in a few moments, an HTML Web Gallery will open in your browser. HTML files and resized photos have been placed into specified folders and you can transfer them anywhere you want.

All of the controls on this main window are obvious. And while this may be all a regular user would ever need to know, for advanced users there are a couple tweaks.

Pressing "CSS" link at the bottom of the form brings a section that allows modifying the CSS for the index (thumbnails) page, giving the user complete control over the page appearance.

"Master Page" link provides a functionality of integrating the gallery into the design of an existing Web site. All you need to do is just to place <%WG%> into the body of any HTML page and the gallery pages will be created based on that page where gallery-specific code is inserted instead of <%WG%>. See integration sample here.

Points of Interest

The project was intended to address a specific set of requirements in the shortest time possible. In addition, I am a Web developer who writes desktop applications only when it cannot be avoided. As such, the code will certainly not win any prizes and will not open any new grounds. The best I can say is that it is simple. As such, I will not be presenting any code in this article; if interested - just look for yourself.

There's a number of features/fixes that could have been easily added to the program like handling of other graphic files besides JPG; handling image subfolders; using something else instead of Microsoft.VisualBasic.Interaction for Registry works; better structuring of the code; having HTML blocks in resources instead of having them hardcoded and much more. But it does what I need it to do just fine, so if somebody needs to improve on it, you've got the source code.

Latest Updates

September 2007

  • Upgraded project to Visual Studio 2005 (it was about time)
  • Added control for resized image quality (thanks to Dmitry A. Mottl)
  • Lightly changed CSS

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ruslan Sudentas
Web Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralEast Asia fonts doesn't work Pin
Min Tsao19-Aug-10 10:10
memberMin Tsao19-Aug-10 10:10 
GeneralRe: East Asia fonts doesn't work Pin
Ruslan Sudentas22-Aug-10 13:13
memberRuslan Sudentas22-Aug-10 13:13 
GeneralRe: East Asia fonts doesn't work Pin
Min Tsao22-Aug-10 13:35
memberMin Tsao22-Aug-10 13:35 
GeneralRe: East Asia fonts doesn't work Pin
Ruslan Sudentas22-Aug-10 13:54
memberRuslan Sudentas22-Aug-10 13:54 
GeneralRe: East Asia fonts doesn't work Pin
Min Tsao22-Aug-10 14:10
memberMin Tsao22-Aug-10 14:10 
GeneralRe: East Asia fonts doesn't work Pin
Ruslan Sudentas23-Aug-10 4:44
memberRuslan Sudentas23-Aug-10 4:44 
GeneralRe: East Asia fonts doesn't work Pin
Min Tsao23-Aug-10 6:23
memberMin Tsao23-Aug-10 6:23 
GeneralNewest source code Pin
DalePres9-Jun-10 14:43
memberDalePres9-Jun-10 14:43 
GeneralRe: Newest source code Pin
Ruslan Sudentas22-Aug-10 14:04
memberRuslan Sudentas22-Aug-10 14:04 
It was all my time to develop the version in the article - so I've opened the source. But I've paid to finish the latest version on http://pranas.net/webgallerycreator/[^] - so I can't just open the source, sorry.
GeneralNewbie's question Pin
eevakk9-Jun-09 11:07
membereevakk9-Jun-09 11:07 
GeneralRe: Newbie's question Pin
Ruslan Sudentas22-Aug-10 14:05
memberRuslan Sudentas22-Aug-10 14:05 
GeneralQuestion on css Pin
Plato_Costa17-Feb-09 11:57
memberPlato_Costa17-Feb-09 11:57 
GeneralRe: Question on css Pin
Ruslan Sudentas18-Feb-09 7:49
memberRuslan Sudentas18-Feb-09 7:49 
Generalsuggestions Pin
chamanmago13-Dec-08 2:52
memberchamanmago13-Dec-08 2:52 
GeneralRe: suggestions Pin
Ruslan Sudentas14-Dec-08 11:47
memberRuslan Sudentas14-Dec-08 11:47 
GeneralRe: suggestions Pin
chamanmago14-Dec-08 15:33
memberchamanmago14-Dec-08 15:33 
GeneralRe: suggestions Pin
Ruslan Sudentas15-Dec-08 10:12
memberRuslan Sudentas15-Dec-08 10:12 
GeneralJavascript Transition does not always work. Pin
Ian Eager19-Nov-08 6:40
memberIan Eager19-Nov-08 6:40 
Questiontd.tdImg Pin
ihoskins1118-Nov-08 3:47
memberihoskins1118-Nov-08 3:47 
AnswerRe: td.tdImg Pin
Ruslan Sudentas18-Nov-08 3:58
memberRuslan Sudentas18-Nov-08 3:58 
GeneralRe: td.tdImg Pin
juno91218-Nov-08 12:12
memberjuno91218-Nov-08 12:12 
GeneralRe: td.tdImg Pin
ihoskins1119-Nov-08 5:22
memberihoskins1119-Nov-08 5:22 
GeneralRe: td.tdImg Pin
Ruslan Sudentas20-Nov-08 15:49
memberRuslan Sudentas20-Nov-08 15:49 
AnswerRe: td.tdImg Pin
ihoskins112-Dec-08 3:40
memberihoskins112-Dec-08 3:40 
GeneralSub-Directories Pin
thund3rstruck28-Sep-08 5:46
memberthund3rstruck28-Sep-08 5:46 
GeneralRe: Sub-Directories Pin
Ruslan Sudentas28-Sep-08 17:01
memberRuslan Sudentas28-Sep-08 17:01 
GeneralRe: Sub-Directories Pin
Adam Cheeseman1-Dec-08 10:37
memberAdam Cheeseman1-Dec-08 10:37 
GeneralRe: Sub-Directories Pin
Ruslan Sudentas1-Dec-08 10:46
memberRuslan Sudentas1-Dec-08 10:46 
GeneralRe: Sub-Directories Pin
Ruslan Sudentas22-Aug-10 14:07
memberRuslan Sudentas22-Aug-10 14:07 
QuestionNew User Question Pin
Ron Wood10-Sep-08 9:08
memberRon Wood10-Sep-08 9:08 
AnswerRe: New User Question Pin
Ruslan Sudentas10-Sep-08 10:04
memberRuslan Sudentas10-Sep-08 10:04 
GeneralImages Don't Always Appear Pin
juno91225-Jun-08 9:27
memberjuno91225-Jun-08 9:27 
AnswerRe: Images Don't Always Appear Pin
Ruslan Sudentas25-Jun-08 9:51
memberRuslan Sudentas25-Jun-08 9:51 
GeneralRe: Images Don't Always Appear Pin
juno91225-Jun-08 11:05
memberjuno91225-Jun-08 11:05 
GeneralRe: Images Don't Always Appear Pin
juno91225-Jun-08 18:59
memberjuno91225-Jun-08 18:59 
GeneralRe: Images Don't Always Appear Pin
Ruslan Sudentas26-Jun-08 11:26
memberRuslan Sudentas26-Jun-08 11:26 
GeneralRe: Images Don't Always Appear Pin
juno91226-Jun-08 12:30
memberjuno91226-Jun-08 12:30 
GeneralRe: Images Don't Always Appear Pin
Ruslan Sudentas30-Jun-08 7:10
memberRuslan Sudentas30-Jun-08 7:10 
GeneralRe: Images Don't Always Appear Pin
juno91230-Jun-08 7:53
memberjuno91230-Jun-08 7:53 
QuestionRe: Images Don't Always Appear Pin
juno91217-Nov-08 20:30
memberjuno91217-Nov-08 20:30 
AnswerRe: Images Don't Always Appear Pin
Ruslan Sudentas18-Nov-08 4:08
memberRuslan Sudentas18-Nov-08 4:08 
GeneralPic Images Pin
juno91212-Jun-08 11:54
memberjuno91212-Jun-08 11:54 
GeneralVery Nice Job Pin
JASON_S_24-Mar-08 18:22
memberJASON_S_24-Mar-08 18:22 
GeneralIm really a noob at all this Pin
Wizzap18-Mar-08 12:22
memberWizzap18-Mar-08 12:22 
QuestionGallery use in Ebay Pin
gcheak13-Jan-08 15:24
membergcheak13-Jan-08 15:24 
AnswerRe: Gallery use in Ebay Pin
Ruslan Sudentas14-Jan-08 4:49
memberRuslan Sudentas14-Jan-08 4:49 
GeneralUse for video and game Pin
XGuarden30-Oct-07 20:10
memberXGuarden30-Oct-07 20:10 
GeneralRe: Use for video and game Pin
Ruslan Sudentas31-Oct-07 4:04
memberRuslan Sudentas31-Oct-07 4:04 
GeneralGenius...Genius...Genius! Pin
Devinmccloud30-Aug-07 0:14
memberDevinmccloud30-Aug-07 0:14 
GeneralFrames Pin
allmedia16-Jul-07 8:04
memberallmedia16-Jul-07 8:04 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150731.1 | Last Updated 7 Oct 2007
Article Copyright 2006 by Ruslan Sudentas
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid