Archive for the ‘CSharp’ Category

Photo Gallery Maker 1.2

Monday, April 26th, 2010

After I built my new computer, I went to put a photo gallery together and realized my Photo Gallery app ran at about the same speed as it did on my old PC.  I was running all the thumbnailing and image scaling in a single thread, so it was only taking advantage of one core (and I have a simulated EIGHT in my new PC) no matter what.  So I fixed it.

Photo Gallery Maker 1.2 has support for multi-core systems.  It will run ([number of simulated cores] / 2 + 1) threads for thumbnailing and image scaling.  Just about every system available today should see a noted improvement from version 1.1.

There was also some funny stretching going on with the thumbnails on the generated web page.  I fixed that too.

Download Photo Gallery Maker 1.2.

For more info, see the 1.1 post or the original announcement.

Photo Gallery Maker 1.1

Monday, November 23rd, 2009

I was working with Photo Gallery Maker recently and decided it needed a bit of an update.  Key changes are as follows:

  1. You can now have Photo Gallery Maker include a .zip file of all the photos in your gallery.  If you do this, there will be a “download all photos” link in the title bar allowing viewers of your gallery to download the photos.  You can include the original photos or the resized versions in the .zip file.
  2. You can now save and load your gallery as xml.
  3. I’ve adjusted the look and feel of the full size image (shown when you click a thumbnail).
  4. You can now view the images in a slideshow.  A slideshow control panel is shown if you mouse over a full size image.
I’ve also fixed a few bugs:
  • There was a nasty memory leak in the image processing code.  If you were working with large images, it would most likely run out of memory.
  • Drag and drop should drop to the correct position now.  It was off by one in certain cases.
  • If one of your images was sufficiently tall, it would overflow onto the caption.  I’ve fixed this by causing the thumbnail to get squashed if it’s too tall.  The full size version remains unchanged.
This build includes a library called SharpZipLib, which is available under the GPL.  As such, source code is not included in the installer (you won’t notice it unless you’re trying to).  A file called source.zip contains all source code, and it is copied into the Photo Gallery Maker folder in Program Files.
Nab this new build here (1.1 MB).
For more info on Photo Gallery Maker, see my post about version 1.0.

Photo Gallery Maker

Thursday, April 16th, 2009

In my last post, I mentioned I’d be posting tool to create a simple photo gallery. Well, I finished it earlier than I expected. I’d like to talk about the workflow I designed it around, though, before just throwing a link out.

How To Use It

To use my tool, you’ll need the following:

  1. Microsoft .NET framework 3.5 installed. If you don’t have this, you can get it here.
  2. A website (or an http server) where you can post a folder full of files.
  3. Some photos you want to post online.

The general use case is as follows:

  1. Open up Photo Gallery Maker.
  2. Enter a title for your gallery in the title box.
  3. Drag photos into the large empty listbox. Reorder as necessary using Drag and drop or the sorting options available.
  4. Choose a color scheme.
  5. Click “Export Webpage”, specify an output folder, and click ok. At this point, the app will generate thumbnails and web ready images from your source pictures. It will also copy the necessary CSS and JavaScript files and generate the html for you.
  6. Once generation is complete, copy your destination folder to your
    website. You can then link to the http path of the folder on your website to
    view the gallery.

For example, if I generated the folder “photos” on my computer, and copied it to /www/galleries on my website, then I’d link to http://www.lukerymarz.com/galleries/photos or http://www.lukerymarz.com/galleries/photos/index.html.
Other Features

Now, there are a few extra features I overlooked.

  1. You can double click an image or select it and press enter to change the caption displayed under the thumbnail in the web page. You can alse do this through a right click.
  2. If you’d like a faster way to enter captions, select and image, right click it, and choose “Begin Quickedit Mode”. This will allow you to enter a caption for the current image. When you press enter or tab, the edit focus will move to the next picture and you can enter it’s caption. This will continue until you’ve entered a caption for all the images or clicked the mouse somewhere else.
  3. By default, the full size image will be 800×600. You can choose a few different sizes in the “Image Size” group on the right side of the app. 800X600 is fastest with HighSlide, but sometimes you just want a higher resolution.
  4. If you need to regenerate the html or choose a different color scheme for your gallery, but you don’t want to regenerate all the images, you can use the “Export HTML” button. It will do just that (copy the highslide files, the current color scheme, and generate a new index.html). If you’ve changed the photos in the gallery, use this at your own risk!

CAVEAT: You must have the .NET Framework Version 3.5 installed for this to run. If it’s not installed, you’ll get an error message when you start it up.
Anyways, I found this pretty useful for posting galleries to my website to share with friends.
Photo Gallery Maker version 1.0 can be found here.
Photo Gallery Maker version 1.1 can be found here.  Read more about it here.
Drop me an email at lukerymarz@gmail.com if you have any questions.

A Proper Web Photo Gallery

Wednesday, April 15th, 2009

I don’t know if I’m the only one, but I’ve yet to see a photo gallery in a web page that I like.  The primary problems are:

1.  I don’t want to have to press the back button every time I look at a picture (like facebook, for example).  To that end, the whole gallery (thumbnails and full size images) should be contained on a single page.
2.  I want it to load fast.
3.  I want to have it look nice.
4.  Each picture should have room for a short description.
5.  It should resize to fill the browser window with thumbnails (so you can treat it much like a thumbnails view in Windows Explorer).
Rather than complain about it, though, I thought I’d make something I was satisfied with.  Well, I worked with my girlfriend to put one together (She’s learning HTML and needed a project).  Here’s a sample of how it turned out.
I used Highslide for the fancy javascript transitions.  It’s a really nice kit that plugs in easily.  The only issue I had with it was because I had defined a style for img elements.  The fix was to… not do that, define class that each image could use (for example class=”imgThumb”).
Anyways, this post is a heads up, because I wrote a tool to throw galleries like this together, and I’ll be posting it soon.  More about that when I get there.