Tag Archives: photography

Bulk Photo Cropping



As you probably already know, Irfanview is one of my favorite free programs. I’ve used it for years and every computer in the house has it. Read past posts about Irfanview  here and here and here. Irfanview is fast, fun and works perfectly every time. You can download it and its plugins from Tucows. Get it here: http://www.irfanview.ca/main_download_engl.htm

If you have used Irfanview for a screen capture session, you’ve probably got dozens or hundreds of jpgs that include more of your screen than you need. Irfanview is perfect for captures but sometimes the box you draw around your target is too big. Here’s how you can set Irfanview up to crop those captures in one operation, no matter how many photos you have. How do I know? I’ve used this method before to crop about 2400 photos that I made into a little animated gif. It didn’t go viral but it was fun make.

1. Get all of your jpgs in one folder. Sort them out so that all the photos have the main capture in the same position on the screen. If you moved the window at some point while you were capturing the whole screen, sort those photos out and put them in different folders. You can reorganize them later.

2. Open Notepad or keep a paper and pencil by your hand. You will be writing down a few numbers for each cropping job.

3. Before you actually begin to crop, practice sizing the crop area first. Open one jpg. As with most programs, holding down the left mouse button and dragging the cursor will create a box. Test this out and try to get the correct size, the one that looks best to you. When you have the right box, click anywhere outside the box to unselect the crop.

4. Next, click on the top left corner of the area that you want to crop. Don’t move your mouse, just click once and hold it there. On the top left of the Irfanview window you’ll see XY:(number,number). This is your X -Y reference point. Make a note of those two numbers. This is what you will see:

The first crop window
Look for the XY:(480,561) - your numbers will vary.

5. Next, you’ll want to write down the full size of the crop box that you want. Click in the same spot, or as close as you can to it, then drag the box out and hold the mouse button down until you are able to read the numbers that you need. What you’re looking for is the number of pixels that define your crop box’s height and width. In the photo below, you’ll see what I mean.

Set the width and height of the box here.
See the (646x472 Pixels, 1.369)? You need the first two numbers: 646 and 472

6. Now you have the numbers that describe where the box starts and the numbers that describe the size of the crop box. You’re all set to start your batch cropping. Look for File on the top left, then Batch Conversion/Rename. The following window will open:

The batch processing window
Here is where you will do two things. Add the photos to crop and choose your output directory.

7. Set up the menu by checking that ‘Batch conversion’ is ticked. Then, on the top right, select the photos you want to crop. Remember when I said to keep your photos separate? This is why I said that. It’s much simpler to choose ‘Add all’ as opposed to picking through the jpgs one by one. Click ‘Add all’ if you have all the right photos in one folder. Then, in the middle left, choose where you will put the cropped pics. Don’t use the same directory as the originals, just in case you make a mistake with your crop window. You still want the originals until you make sure your numbers are correct. Once you’ve done these steps, click on the ‘Advanced’ button. The following window will come up:

Advanced Crop Window
Don't get nervous. This window looks complicated but it's not that bad.

8. Top left, see the Crop section? This is where you’ll fill in the numbers that you wrote down earlier. Make sure ‘Crop’ is checked then type in the X-pos number and the Y-pos number. Below that, write in the width and the height. Below that, make sure that ‘Left top’ is chosen. You can crop in any corner, just make sure you know which corner you have chosen. I always use top left but you can do whatever you want.

9. Make sure that nothing else is checked. On the bottom right, I have ‘Overwrite existing files’ chosen, simply because it’s easier if I make a mistake. I put the cropped photos in a new folder then I check it after the batch if finished. If I have made a mistake, I redo the numbers and run the batch again. I don’t have to open a new folder.

TIP: If you are doing a few batches, uncheck the ‘Overwrite existing files’ just in case you forget to use a new folder. Make sure this is unchecked if you are using the same folder as the originals, too. I’d advise against that, however.

10. Double check everything then choose OK once to close that menu. The batch menu is still open, of course, and you need to press the ‘Start batch’ button. Once you do that, Irfanview whisks its way through the task at hand. Depending on the speed of your computer, this might take a while. Wait until Irfanview is done then check your results. Chances are you’ll make a mistake the first few times but read through this again and you’ll get it right, sooner or later.

Thanks for reading!

 

 

 

 

 

 

 

Save/Rename Proxy Pictures



Sometimes when we save a complete web page, as suggested in a previous post, we get a series of proxy files instead of .jpg files. Sure, we can right click each picture and save it individually but if there are fifty photos on the page, that takes a lot of time. Here’s an example of a page that I would normally save, just to get the photos: http://www.howtobearetronaut.com/2011/09/polaroids-1970s-by-anthony-perkins/

 

This is from one of my favorite sites, full of interesting photos of very unique parts of our history. If you look at the page, you’ll see a string of family photos from Anthony Perkins, maybe ten or so. I could right click and save these in a short time but this is an example, just to show you what can be done if there are thirty, fifty or a hundred photos on a page.

Instead of linking each photo to a .jpg file in a folder on the server, this page uses proxy files to feed the images. This is a more secure way to link pictures and their source on a website. Once you have downloaded this page, this is what you will see in the site folder on your computer:

A String of Proxy Files
Instead of .jpg files, you will see these proxy files.

Where you usually see .jpg files, in this case you will see proxy files. Actually, at this point, they aren’t even files since they don’t have any extension. Again, we could rename each one and add the .jpg file extension to it but you can see how long that would take. How can we rename and add a file extension more easily than that?

Yesterday, I wrote about adding a command window to our right click menu. That post is here.  These are the  steps that will make renaming and adding a file extension to all of these files a very simple job.

1. First, you need to separate the proxy files from the rest of the files in the folder. Create a new folder anywhere on your computer. Put one right on your desktop, if you want. Highlight all of the proxy files, right click them and choose copy. Paste them into the new folder that you created.

2. You will notice that there are far more proxy files in the folder than there were full size photos in the page. Don’t worry about that now.

3. This will be a two step process, only one of which uses the command prompt. Open the new folder, if it isn’t already, and highlight all the proxy files. We’re going to rename all the files at once, changing the ‘proxy(x)’ to something like ‘Polaroidx’. Highlight all of the files using Control/A (select all). Right click the blue selection and choose ‘Rename’. One of the files will show a flashing menu where you can type Poloroid  like this:

Type Poloroid in the Box
This is the first step, type Polaroid in the box.

Hit enter and every file in the folder will be renamed Polaroid, Polaroid1, Polaroid2, etc. That was quick, right? You can do this with any folder that you have, renaming your DSC files to something that sounds friendlier, for example. OK, the files are now renamed but they are still useless to use since we can’t open them, right? Back out of this folder but keep it in front of you on the desktop.

3. Holding down the Shift key, right click the  folder and choose ‘open command window here’.

Right Click Command Window Choice
Hold the shift key, right click and this is what you see.

4. A black background window with some white type on it will pop up. This is your command window, a very powerful (and fast) tool, if you know what you’re doing. Here’s the menu you should be seeing:

Command Window Open
This is the command window (used to be DOS prompt)

5. Here is where you can perform actions on the folder or everything in the folder. Click anywhere in the window to activate it, then type this:

ren * *.jpg       (like this: )

This is Where We Rename All of the Files
Type exactly what you see here.

OK, the ‘ren’ means ‘rename’. The ‘*’ means everything or all. The *.jpg means to rename everything that has a name before the period to the same name but add .jpg after the period. You can use ‘rename’ too but why bother?

5. Once you have typed EXACTLY what you see here, hit enter. The command window flashes and then sits quietly, waiting for more commands. Since we don’t need it anymore, close the window.

6. Open the folder and you’ll see this:

Renamed Files with File Extensions
Here is what we set out to do. Files are renamed and the .jpg extension has been added.

The next steps depend on what you’ve saved in the first place. In this case, some of the files are full-size, some are tiny. You’ll have to figure out which ones are the ones you want. Go up to the top right and change ‘details’ to ‘large icon’, then click each photo you want to save while holding the Control key. Once you’ve got them all selected, move them to another folder and delete the current folder.

TIP: If you know something about DOS, it would be easy to both rename the files and add the files extension in one step but I thought this would be less confusing. The simple ‘ren * *.jpg’ statement is far less confusing, in my opinion.

Thanks for reading!



Photography 101



A friend of mine was having some issues with his digital camera, a new DSLR , which means digital single lens reflex, as opposed to a point and shoot. Reflex means you look through the lens when you put the camera up to your eye, allowing you to focus and frame your picture much easier. (There are dual lens cameras, hence the ‘single lens’ designation.)

I’d noticed some camera shake in his pictures so I suggested that he change a few settings in order to help get rid of the shake. Since this person isn’t a techno-weenie like me, he had a hard time figuring out what I meant so I explained it in non-technical terms. If you are new to photography, here’s my explanation:

Think of a room with a single window. The window is equipped with a blind that is able to shut out all of the light, part of it or none of it.  The room is the inside of your camera, the window is the lens and the window blind is both the camera shutter, the thing that allows light into the camera in measured portions depending on how long it is open AND the aperture. The aperture is a measurement of how wide the blind is open, not how long it is open.

Three things affect how much light gets into the room. Three things affect how much light gets onto your ‘film’ inside the camera, too. Let’s look at them one by one.

1. The window blind lets light in. You control how much light gets in by opening the blind or closing it. Wide open, lots of light. Halfway open, some light. Closed down, almost no light or no light at all. This is the aperture in your camera.

2. The blind is also the shutter, right? Flinging the blind open for a second, some light will get in. Open it for a longer time and even more light gets into the room.

3. The room, for now, is painted black. This would represent a low ISO. Don’t worry about what ISO is or means, just remember that a low ISO means a black room which would need a lot of light for anyone to be able to see anything in it. Stay with me, this will make sense soon.

Let’s say you are looking for something in the room. When you consider the three things that let light into the room, you will see that you need a combination of two of them to be able to find whatever it is you are looking for.

1. The room is black, there is bright sun outside so you fling open the blind a bit and the object can be found quickly.

2. It’s night time, the moon is out so you open the blind almost all the way and you find the object but it takes some time.

3. It’s a dark night, no moon so you have to open the blind all the way and keep it open until your eyes adjust to whatever light there is. After a long time, you find the object.  You think to yourself, ” I should paint this room white so it would be easier to see things on a dark night”.

After painting the room white, which is the same as changing the ISO to a higher number, you run through the same exercises as above. In each example, the blind is open for a much shorter time, even on the dark night. You decide to change the room again, this time by putting mirrors on each wall. This is the same as changing the ISO to an even higher number.

Running through the exercises, you notice that with the mirrors reflecting whatever light hits them, the blind can be opened for a shorter period of time. You’ll notice that the time that the blinds are open is less, also.

These examples should give you an idea of the settings for your digital camera. The aperture can be open or shut or anything in between. The shutter can be open a long time or not very long at all. The ISO can be changed from low and slow to high and fast, just the same as you can paint your room a lighter color to increase the reflection of light, or darker to kill reflections.

Shake comes into the equation now. If the shutter is open for a tiny fraction of a second, there is no risk of shake or blur. If the shutter is open for anything longer than say, 1/125th of a second, there is a great possibility of shake. Keep that shutter open for half a second and you’re begging shake to pop into your pics. What’s the answer?

Look at the examples above. To decrease the time that the shutter is open, we have to adjust the aperture or the ISO. There is a setting for a perfect picture and that setting is a combination of three things. Shutter opening time, aperture width and ISO setting. Each one affects the other.

Fast shutter speed eliminates shake but requires a wider aperture. Once the aperture is open as wide as possible, there is only ISO to play with. After that, you need a tripod and a shutter release to ensure a blur-free photo.

There are two other variables besides the big three. They are ‘noise’ and ‘depth of field’. I will get into these in the next two entries. For now, get used to the big three and see if you can adjust them to eliminate shake. Your camera will have (or should have) three settings other than Auto. One is Aperture Preferred (you tell the camera what aperture you want and it does the rest), Shutter Preferred (you tell the camera the shutter speed you want and it does the rest) or Manual. Manual means that you’re on your own. You decide everything. Good luck with that! You’ll get to be an expert if you practice using these settings.

Thanks for reading! Follow me on Twitter: @_BrianMahoney



Basic Photography



I wrote this a couple of years ago. The principles are still the same but my writing was a bit stilted back then. No matter. Short concise sentences will help you understand Basic Photography.

Photography is light:
1. Light hits something, film or a sensor
2. The film or sensor reacts to how much light hits it
3. The film or sensor saves the image.

An automatic DSLR camera makes adjustments for you. It reads how much light is hitting the object you want to shoot and adjusts three things to ensure you take a good picture.

An automatic camera adjusts :

1. The size of the opening the light goes through. (Aperture)
2. How long the opening is actually open. (Shutter speed)
3. How sensitive the sensor is to the light that hits it. (ISO setting)

You can manually adjust all of these three settings yourself. This will change the other two settings. If you think of all of this as an equation, A + B + C = D, it might make more sense. D is a constant, it’s a fixed number which represents a perfect picture.
A is aperture, B is Shutter Speed and C is the ISO setting. Since D must always be the same, you can see that if you change any of the variables, A, B or C, then you have to adjust one of the other two variables.

If you open your aperture (the hole) more, you have to leave it open for less time, right? If you make the sensor more sensitive to light, you have to either make the hole the light comes through smaller or shorten the time you let the light into the camera. Any change that is made in one, affects the other two. If you remember these variables, you’ll begin to understand what makes a good picture as well as understanding the terms ‘underexposure’ (too little light, too little time open or low sensitivity or a combination of all three) and ‘overexposure’ (too much light, etc.)

Next time I will explain why you might want to adjust one of the three variables.

Thanks for reading. If you like this post, tell others about it. OK? Follow me on Twitter: @_BrianMahoney