Rez4 Image Resizer

June 1st, 2011

We are proud to announce the Rezolude4’s image resizing solution.  After numerous requests from our clients, especially CMS clients, we have taken up the task of developing an application that can resize a list of images.  The resizing is controlled by using width and height constraints.

The aim of the project was to deliver an application that’s simple to operate and will execute the task as expected, giving small but useful features that one normally needs to complete a simple task as resizing images.  We wanted the end result to be a complete implimentation of the windows environment events that so may users are used to.

Setup:

Download Rez4 Resizer v1.2.4.0

Helpfiles:

The helpfiles are now included from version 1.2.2.0.  So you don’t need to download it unless you want to have a sneak preview of how the application work before you download or install it.

Rez4 Helpfile for General Users (PDF) v1.0

Rez4 Helpfile for CMS Users (PDF) v1.0

How does it work?

The basic steps are very straight forward and simple:

  1. Add the images to resize.
  2. Select the destination folder to save the resized images to.
  3. Enter the resize dimention constraints (width and height) in pixels.
  4. Choose resize method.
  5. Press Resize!

Although the steps are straight forward the tool boast with very clever resize options that enable you to work faster with a list of images that you normally would if you have to apply different resize dimetions for each image seperately.

For instance if you have a bunch of landscape and portrait photos and you want to resize so that the width of the landscape images are the same as the heigth of the portrait images (like the 2 examples on the left).  You will have handle them seperately, selecting the landscape images and resize them based on width, and then choose the portrait images and resize them based on height.

With Rez4 Resizer the images are always resized with locked aspect ratio.  All you would do is specify the same width and height in the resize dimension restriction and set the resize option to “Fit - Width and Height”.

Features

  • Opperations are multi-threaded.
  • Different resize options like same height or width images, fit inside dimensions, fill dimentions.
  • You have the option to cut off (crop) the side that overlap the other dimension.
  • A thumbnail, original size on disk, and -dimentions are shown.
  • A live preview of how the resize options will affect the original image.
  • A larger preview that can be maximized to get a exact perception of the output size.

C# Dictionaries for Dummies

May 12th, 2011

In a nutshell:

Dictionaries can be used to store a list of items, but instead of using a standard flat “List” you can identify the records with a key.

First of all, make sure you’ve included the correct namespace:

using System.Collections.Generic;

Secondly you need to declare a dictionary.

For this example we are going to declare a dictionary called dicEmployees and within the dictionary we are going to store the identity number of the employee as well as their name.

Dictionary<int, string> dicEmployees = new Dictionary<int, string>();

Populating the Dictionary

Populating the dictionary is as easy as one-two-three…

dicEmployees.Add(14, “Marcus Orelius”);

In this case we’ve added Marcus Orelius with employee number 14 to our dictionary.

Retrieving Dictionary Values

Retrieving values are just as easy…

string sEmployeeName = dicEmployees[14];

Additional Options:

dicEmployees.ContainsKey(14); // Returns true/false; if the dictionary contains the key 14

dicEmployees.ContainsValue(”Marcus Orelius”); // Returns true/false; if the dictionary contains the value “Marcus Orelius”

dicEmployees.Count; // Returns the total item count in the dictionary (int)

dicEmployees.Keys; // Returns the “KeyCollection” list of the keys currently in the dictionary

dicEmployees.Values; // Returns a “ValueCollection” list of the values currently in the dictionary

Playing It Safe…

I highly recommend building in a safeguard when checking the values of a dictionary:

if(dicEmployees.ContainsKey(14))

return dicEmployees[14];

Dictionary of Dictionaries:

I recently tried a dictionary of dictionaries and was quite happy with the result. Let’s build on the previous example. Assume you want to store a list of years and include if Marcus ever took leave in those years. We are going to declare a dictionary of a dictionary which will enable us to store a list of employees and the years they worked plus if they ever went on leave…

Dictionary<int, Dictionary<int, bool>> dicEmployees = new Dictionary<int, Dictionary<int, bool>>();

Dictionary<int, bool> dicMarcus = new Dictionary<int, bool>();

//Add years and if Marcus ever took leave on those days

dicMarcus.Add(41, true);
dicMarcus.Add(42, true);
dicMarcus.Add(43, false);
dicMarcus.Add(44, true);
dicMarcus.Add(45, false);

dicEmployees.Add(14, dicMarcus);

//Did Marcus take leave when he was 43?

bool wasMarcusAtWorkAged43 = dicEmployees[14][43];

// Value returned is false

Hope that helps…

Hello world!

May 12th, 2011

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!