You are not Logged In! -- Please consider creating an account. (It's free!)
This is the BETA version of the Articles Library -- Expect occasional bugs -- Report them to Daemon_Lotos => [Here]
[ Articles Home | Newest Articles | Submit an Article ]
[ Random Article | Search Articles ]

Editing an image in GIMP; so it can be used on the M.A.I.L. site.
Article © MAIL User: Levi

Editing an image in GIMP, so it can be used on the M.A.I.L. site.

1. Introduction
2. About image files
3. Resizing and cropping images
4. Installing GIMP
5. Running GIMP and finding the tools
6. Cropping an image
7. Resizing an image
8. Troubleshooting
9. Conclusion

1. Introduction

It comes up time and time again, "how do I resize or get my image small enough to be able to submit it to the gallery or post it to the forums?"

For a variety of reasons such as speed of page loads, layout problems, and some level of fairness to those of us who don't have thousand dollar DSLR cameras with macro lens, all of this has been debated on multiple occasions. In the end, images posted to the forums, entered into contests, or submitted to the gallery here at M.A.I.L. should be done with the following restrictions in mind.

Images should be,

-Less than 800px per side.
-Less than 100kB in size.

If you know anything about digital images, you're going to notice those are pretty small numbers, but trust me you can bring a good image down to that size quite easily without ruining the details. I should point out that having a good image to start with is paramount, a blurry or otherwise “bad” image isn't going to be fixed by anything we do here. I'll cover some of the basics on getting a good picture of maille in a future post or article, for now we're going to have to proceed with what we have.

The easy way for anyone to resize or crop an image and get decent results is to use GIMP. GIMP is an acronym for GNU Image Manipulation Program. It's one of the most widely used image editors out there and with good reason. It runs on just about every operating system be it Windows, OS X or Linux (along with a few others), it's quite capable, and best of all it's free. There are certainly other image editors out there that can do what we need, but few of them are free and even fewer of them are cross-platform. By using GIMP, I can write this guide once and anyone can use it.

If you want to follow along using the same images I'm using, they can be found here and here. Right-click on each image and select “Save Image As”. Make note of where you save the images, we'll need to open them later.

Cheat notes: Some of you may know almost what to do or need a quick recap without re-reading all of this, here's a quick run down to jog your memory.

Open your image, pick the rectangle select tool, set the Fixed:Aspect ratio to 4:3, make your selection, Edit > Copy, Edit > Paste as New Image, Image > Scale Image..., set width to 800, press tab, File > Export, give it a filename with.jpg, Export, Click preview, adjust quality until image size is <100kB, Export.

If you want to know why we do those steps read the whole article.

2. About image files

Image files (.png, .jpg .gif) are all “image maps” made up of a grid cut into tiny little squares called “pixels”. The file maps the pixels colour to a grid and you see your image. Most images are measured in resolution which indicates how many pixels the image consists of. An 800x600 image is a grid of 800 horizontal pixels by 600 vertical pixels, each pixel has its own colour value. The more pixels you have the more details you can capture but the larger the file size. In general the more pixels you have the better the image, but it comes at a cost. That cost is size both in a storage sense and how to display it afterwards.

The images coming out of the camera on my iPhone6 have a resolution of 3264x2448 and an average size of 1MB. That means my images are 4 times wider and 4 times taller than what I can post to the forums along with taking up 10x the amount of storage space. To put it in perspective, that means if I posted my images directly without editing them it would take 10x longer per image for the website to load, the website would have to stretch out to be 4x wider than it's meant to be which would add horizontal scroll bars, and cause the text to span the whole 4x wider than normal distance. No one wants to have to scroll horizontally on a website that's meant to be viewed in a vertical way.

While some of you may have 4k monitors, most of you have monitors with a resolution at or below 1920x1080 which, means you can't see a whole 3264x2448 image at once without zooming out. So why not resize it to that zoom level and be done with it? The reasonings behind the site limitations do make sense when you consider the above issues along with just how easy it is to edit an image, as you'll find out in a little bit.

Keep in mind, “bigger” pictures, don't always result in a “better” picture for a variety of reasons. While you should be taking pictures with your camera at the highest resolution possible, that alone will not guarantee a good picture. The nature of maille, creating a pattern or patterns and the rings themselves being round and shiny makes for a subject that's fairly difficult to photograph. To make things worse, metal rings being round wire bent into a circular shape that casts reflections and shadows all over the place, an abundance of multi-directional lighting and a steady camera (preferably on a tripod) will help immensely.

Also keep in mind that when it comes to maille, it's nearly impossible to get a single photo that will show all the details you want. Think about trying to take a picture of a wool sweater that shows both the finished sweater as a whole along with enough detail to see the individual stiches. Or try to take a picture of a lawn while showing the dew drops on each blade of grass. It's not going to happen. You can't have them both.

JPEG Compression, is a type of compression that's used to make .JPG image files smaller. Compression saves space but comes at a cost to quality. When you compress an image the software looks for regions of similar but different colours that can be averaged out to a single colour. The fewer individual colours in the image the less space it takes up. Further to that, certain colours take less space to store than others. Averaging a few pixels here and there is fine but compress things too much and your image will get washed out and blurry. If used properly the quality of the image is almost unaffected but the file size is reduced by half or more. I have a bunch of examples near the end of the article that illustrate what I'm talking about.

I'll touch on these issues more in another post or article about taking pictures of maille but for now keep in mind that you'll probably need more than one image to convey all of the details that maille can present and having a good image to start with is only going to help.

3. Resizing and cropping images

-Resizing or scaling an image changes the amount of pixels an image consists of by stretching or squishing the image to fit over a new resolution map. In nearly all situations you only ever want to resize an image down, i.e. make it smaller. Pixels compress and blend well when making an image smaller. When making an image larger they stretch, bleed colours, and generate visual artifacts. Other than making textures for materials, I can't think of a good reason anyone would want or have to scale an image up. Don't do it, mmkay.

-Cropping an image is cutting portions of the image off to bring the main subject further into focus. This also reduces the pixel count along the way by removing everything outside of the crop. Cropping is one of the most basic image editing functions that's seldom used properly. As any photographer will probably tell you, you'll rarely get an image that's just “perfect” in every way but you will get lots of images that contain “perfect” portions. A well cropped image will make you think the image was taken exactly the way you see it now, but it was probably a part of a larger image at one time.

While this isn't a very good image,

Image: Star_Crop.jpg

it's certainly better than the original, which included my finger.

Image: Star_Pre_Crop.jpg

With proper cropping and resizing, it's easy to get a decent image that is small enough to post yet still shows useful information.

Knowing when and what to crop or when to just resize will vary depending on your images and gets easier with practice. It also gets easier to take pictures knowing you only need a portion of the whole to turn out. I'll explain it a bit more as I walk through the process. Let's get GIMP installed and move on from there.

4. Installing GIMP

The current version of GIMP is 2.8.14, I'm using 2.8.10 but every version of GIMP I've used over the years has had the same tools, in the same place. If you already have a version of GIMP installed, it's probably going to be fine for what we need to do, move on to step 5. If you don't have GIMP installed, read on.

First thing you'll need to do is download the installer, this should be the only part of the guide that varies depending on your OS or operating system. Head over the GIMP Downloads page, the site should detect what OS you're using and direct you to the correct download. In case you're worried the download is relatively small at 60-90MB so even on a “slow connection” it shouldn't take too long.

-Linux Users: Most desktop versions of Linux include GIMP from a base install. If you're using a distro that doesn't include GIMP, follow the instructions on the download page relevant to your distro. i.e. Ubuntu/Debian in a terminal type “sudo apt-get install gimp” and press Enter, provide your password when prompted followed by Y to install. You're done.

-Windows Users: Click on the “Download GIMP 2.8.xx directly” button and save the file, it should be called “gimp-2.8.xx-setup-1.exe” (xx, will change based on the version) once it's finished downloading run the file, if you have the UAC enabled click Yes to the prompt. Follow the setup prompts, the defaults are generally safe options if you don't know otherwise.

-OS X Mac Users: Download the DMG (you may want to use the second non-torrent link), open the DMG then drag GIMP to your “Applications” folder.

NOTE: On OS X Yosemite (and presumably El Capitan) when you try to open GIMP you'll get a warning that says ““GIMP” can't be opend because it is from an unidentified developer.” Blah, blah... click OK. Open “System Preferences” go to “Security & Privacy”. Click on the “General” tab at the top, next near the bottom of the window you'll see the same message as above with an “Open Anyway” button to it's right. Unlock the panel by clicking on the lock in the bottom left where is says “Click the lock to make changes”, provide your password when prompted and click “Unlock”. Now the lock should be open and you can click on the “Open Anyway” button. This makes an “allow” rule for GIMP but otherwise doesn't affect your securtity. I remember when installing something in a Mac was easy... anyway one more step to get GIMP to run. Go to “Applications” and click on GIMP, you'll get another message saying “”GIMP” is an application downloaded from the Internet. Are you sure you want to open it?”, click the Open button. At long last GIMP should now open when you click the icon in Applications.

At this point you should have GIMP installed and there should be an icon for it in your “Panel”, “Applications” or “Programs list”, open up GIMP on move on to step 5.

Tip: The first time you open GIMP it needs to build some folders and setup a few things so it's going to take a while for it to launch, be patient it only needs to do it once.

5. Running GIMP and finding the tools

Now that GIMP is open you'll notice that by default it's split into three separate windows. The Toolbox – Tool Options window, the main window (currently just a small grey window in the middle, with those foxy eyes staring at you) and the Layers – Brushes window.

Tip: OS X Users, like nearly all OS X apps the menu commands are at the top of your screen in the Menu Bar instead of being in the main window.

Image: On_Open.jpg

We won't be using the Layers – Brushes window so you can close it via the X in the top right if want to save screen space, if it's not bothering you then leave it there.

Before I can show you much more you'll need to open a file. If you want to work on an image of your own that's fine but depending on your images resolution things may look or layout a bit differently. Click on “File” from the menu on the main window then click on “Open...” or press Ctrl+O and browse to either of my files that you just downloaded or an image of your own, select the file and click Open.

As mentioned above, the images from my camera are 3264x2448 which is a bit larger than the average screen, if you can't see the outer edges of the image, press and hold Ctrl then Scroll Down with your mouse wheel, you'll zoom out until you can see the whole image.

Tip: If you don't have a scroll wheel you can press – (minus) on your keyboard to zoom out, in increments. Zoom out until you can see the whole image. You can also use + (plus) on your keyboard or Ctrl+Scroll Up to zoom in, if you go too far out.

Next make sure you can see the File, Edit, Select menu on the main window. Windows and Linux users will probably need to move the Toolbox and Layers window(s) down a pinch.

There are two items in GIMP that we're going to use, the Scale Image function and the Crop Tool. The Scale Image function is available from the main window by clicking on “Image > Scale Image”, the crop tool is in the Toolbox as outlined below.

Image: Scale_Image.jpg

The Toolbox – Tool Options window has a whole bunch of fun tools but the only one we're worried about for now is the “Rectangle Select Tool”, it's the dotted rectangle in the top left of the Toolbox. When you click on it you'll notice the bottom section of the window changed and now the Tool Options are showing the options for that tool.

Image: Toolbox.jpg

6. Cropping an image

There are times where you won't need to crop an image but from experience that's pretty rare. If you like the image as a whole and you feel every part of it is relevant then move on to step 7.

Ok, so as you can see I have a picture of one of my Shaggy Candle Skirts lit sitting on my washing machine in a dark laundry room. This is a fairly atypical setup when it comes to photographing maille but it's works here for a few reasons. I've scaled the image below down from 3264x2448 to 800x600, other than being 4 times smaller I didn't otherwise edit it.

Image: Shaggy_Candle_Skirt.jpg

You can get the original image here and if you wanted to make one of these shaggy candle skirts, you can read my article on how to make them over here: Shaggy Candle Skirts.

What's wrong with the image aside from it being too big?

First thing, the candle is a little bit off center to the image, second there's too much black in the upper portion of the shot and if you look carefully you can see the end of the washing machine in the top right corner. The image has other issues but for now those are ones we're going to fix. The crop tool will let us remove most of that black area and realign the candle to the center of the image in the process.

The key to getting a good crop is forcing the selection to a fixed aspect ratio. If you use the crop tool in free hand mode, you will get all sorts of oddly sized images. The aspect ratio for images determines the ratio of horizontal pixels to vertical pixels. Given we want to end up at the 800px a side limit, the most common aspect ratios at that resolution are 4:3 for landscape or 3:4 for a portrait layout. By cropping to that aspect ratio now we can ensure our image will look right when we later resize it to either 800x600 or 600x800, either being acceptable for use around here.

Click on the “Rectangle Select” tool in the “Toolbox” (if you haven't already), now go down to the “Tool Options”. Place a checkmark in the “Fixed: Aspect ratio” box, click in the box below that says “Current” wipe that out and type “4:3” then press Tab on your keyboard. The small box with mountains in it, to the right will be selected in grey. We've now forced the selection tool to stay at that aspect ratio in a landscape format. This means if you grow or shrink the selection horizontally it will also grow or shrink vertically at the same time to keep the aspect ratio. Let's try it out.

Make a selection by clicking in the top left corner of the image and holding LMB (left mouse button), now drag your cursor down to the bottom right, when you have most of the candle selected let go of LMB. You'll now have a dashed white and black box with four smaller boxes in each corner sitting over the image.

Image: Rough_Selection.jpg

A few things to notice now that you've made a selection. In the Tool Options, just below where we set the Fixed Aspect ratio there are two important sets of numbers to look at, the Position and Size values.

The position, lists where your selection starts relative to the top left corner of the selection box, you want to make sure none of the position values are negative, if they are negative that means your selection is outside of the image which will result in a bare white patch in that spot. Keep your selection within the image.

The size, lists how big the selection box is at the moment. While you could just set this to 800x600, take your selection from there directly but it's quite limiting and most of the time your going to want more flexibility than that. I have an example of this with another image later on. We don't want the size to be any less than 800x600 or the selection will be too small, larger all the way up to nearly the full size of the source image is fine. As you can see below a straight 800x600 crop won't do me much good with this image.

Image: 8x6_Crop.jpg

Tip: If you add the position values to the selection values they should be less than the original image size, if they are over you'll get white patches at the bottom or right sides of your crop.

You can adjust the size and position of the selection using your mouse. Move the selection box by clicking and holding LMB anywhere in the middle of the selection box then drag it around to center it to the candle. A small + will show up in the middle of the selection box to indicate the center of the selection.

To resize the selection box move your cursor to an edge, an orange bracket will show up, click and hold LMB then drag to resize it. If you move your cursor to a corner that box with turn orange, click and hold LMB, now you can drag the selection in two directions. Notice how the selection box adjusts itself to keep the aspect ratio intact.

Here's where you need to start making choices. If we position the selection center to the middle of the flame we loose those nice long petal shadows along the bottom. In a general sense you want your focal item to be centered but in this case the flame itself shouldn't be what we're focusing on, I want to draw attention to the scales and weave, so let's move the selection down a bit while keeping it horizontally centered to the shadows. By aligning the selection to center around the petal shadows the center of the image is now the front of the skirt where the scales and weave meet. I find the petal shadows draw the eye in towards the scales and the weave, the flame is there but it's not the focal point. We're getting into photo composition which is generally an artistic freedom, focus on what you want someone to take away from the picture and crop where you see fit. I like this crop.

Image: Centered_Crop.jpg

This is a good “show” picture to display what the finished piece looks like, which is what I wanted this image to do but it's no good at displaying the technical details on how it's made. To see the weave on an understandable level I'll need another photo taken much closer up, under different lighting which I've done. Further along in the article I'll show you a few crops on another picture that's more suitable for showing the weave.

Finding the right crop point is highly subjective but once you've found something you like go to “Edit” from the menu then click on “Copy”. Now click on “Edit” again but this time click on “Paste As > New Image”.

Image: Copy_Paste_As.jpg

You'll now have a new image window that only consists of your previous selection. If you're happy with what you have you can close the original image we don't need it anymore. If you don't like the crop, close the new window (don't save), go back to the original and try again.

Image: New_Image.jpg

Alright, we now have a new image that's centered to the subject, it doesn't have a whole bunch of black around the top but the image is still 2377x1783.

7. Resizing an image

Now that you have your newly cropped image it's time to bring it down to size. We'll do this in two ways, first by reducing the pixel count to 800x600 and second by compressing the remainder.

From the menu click on “Image” then “Scale Image...”. The Scale Image window will open, in the “Width:” box type in “800” then press Tab on your keyboard, the “Height:” will have changed to “600” to match the aspect ratio. Leave everything else as is and click the “Scale” button.

Image: Scale_8x6.jpg

The image will now be smaller on-screen, you can zoom in a bit to get a better look.

Image: Scaled_to_8x6.jpg

At this point the only thing left to do is export the image as a .jpg and pick a compression ratio that gets us to our 100KB file size.

We don't want to “Save” the file, that will result in a .XCF file which is fine when working in GIMP but we're done in GIMP, we need the file as a .jpg so we have to export it. Click on “File” from the menu and click on “Export”.

When the export window opens browse to the folder that you want the image to be in, give the file a name including the .jpg at end, then click on the Export button.

Image: Export.jpg

In the screenshot above, I have a folder on my “Desktop” called “Edited Images” where I'm going to save the file as “SCS.jpg”. Don't save over your original file, save to a different folder or give it a different name like “SCS_800x600.jpg”. You may (as I often do) look at an image a day later and say “What was I thinking when I cropped that???”, so long as you still have the original image you can go back and try again.

After clicking the Export button, the “Export Image as JPEG” window will pop-up.

Image: Export_As_JPEG.jpg

The quality is set to 90 by default which is usually a pretty good balance between quality and file size but probably not quite enough to be under 100kB most of the time. Notice how the “File size:” is listed as “unknown”, GIMP can't figure out the file size unless it previews the results so put a checkmark in the “Show preview in image window”. As soon as you do, an Export Preview window will show up, most often directly above the “Export Image as JPEG” window, like this.

Image: Export_Preview.jpg

Move the Export Preview window to the left or right a bit so you can click on the “Export Image as JPEG” window, the preview window will move to the background which is fine because now the “File size:” listing has a value.

Image: Export_File_Size.jpg

At this point adjust the “Quality:” slider, type a value between 1-100 or use the up and down icons at the top to change the JPEG compression, as you change the value, the file size will be recalculated to match. In most situations you'll need to move the slider to the left to increase the amount of compression, reducing the quality and file size until you get to less than 100kB.

With the selection I've chosen here along with the default quality value of 90 my image is going to export at 74.3KB. While small enough to post, it's 25kB below the 100KB limit. So, I can afford to ease off on the compression a bit until my image reaches 100kB in size. I was able to increase the quality value to 93 giving me a 94.8kB file, with the quality set to 94 the file was too big at 107.4kB. This image compresses well due to the abundance of the colour black in it, as you'll see in my later example of a more typical maille picture it will be larger and won't compress quite as well.

Tip: Don't reduce the file size any further than you have to, it's rare to hit 100kB perfectly most of the time your files will end up somewhere between 90-99kB. If you have to reduce the quality below 60 to get a sub-100kB image at 800x600, something is wrong! Check the Troubleshooting section at the end of the article.

To see how much of an effect the quality setting you've chosen is having, click back on the preview window to see the effects of the quality setting. Here are a few examples of what the quality setting will do.

-With the quality set to 100 or no compression applied the image will look the same as it does currently but it will be 365kB in size.

Image: Export_Q100.jpg

-With the quality set to 80, the image starts to get fuzzier but it's still pretty good, the size has now gone down to 43.8kB

Image: Export_Q80.jpg

-Jump down to a quality of 30 and it's getting ugly, the dark shades from the edges are badly “checkered” and the halo around the flame is quite fuzzy but hey the image is only 18.1kB

Image: Export_Q30.jpg

-At a quality of 10 you can really see the compression artifacts, everything but the scales in the middle of the image have lost any crispness or detail and the file size isn't shrinking like it did previously, the file is still 11.2kB. That's a serious quality loss for less than 7kB of space savings.

Image: Export_Q10.jpg

-When set to 0 the image is reduced to a horrible mess with only a few colours that barely resembles the original image, hanging in at 7.4kB.

Image: Export_Q0.jpg

Tip: Never compress an image any more than you have to. As you've seen, if taken too far compression will completely ruin a good image.

If you're happy with the results and you've hit the sub 100kB mark, click the Export button in the “Export Image as JPEG” window to finally save the file as a JPG.

Your image is now ready to be shared on the forums, entered into contests or be submitted to the gallery. Using Finder, Nemo or Windows Explorer browse to the folder you saved your image to and double-click it to open it in your default .jpg previewer.

Here are a few examples of how I cropped a different image of the candle skirt to better show the weave.

Image: SCS_2.jpg

Using this image, I cropped a small piece of the original. My selection was 1036x777, I cut, pasted as new, scaled it down to 800x600 and exported it. I had to bring the quality down to 84 to get to the 100kB mark but the image hasn't suffered much, you can see the outer ring interactions and you don't see the table, candle or much else, the focus is on that section of the weave.

Image: SCS_2_Weave_8x6_100k.jpg

If I wanted to bring attention to the scales, I'd crop it like this.

Image: SCS_2_Scales_8x6_100k.jpg

Remember earlier when we first made our selection and I said that you could just crop at 800x600 but probably shouldn't. Here is what I got when I cropped directly from this original at 800x600.

Image: SCS_2_Direct_8x6_100k.jpg

Yeah it works, all I had to do was crop, copy/paste as and save. While this image is very similar to the first shot of the weave that I cropped out @1036x777, there are a few key differences. In the first one you can see more of the candle and the scales which gives you a better take on perspective. The second crop @800x600 doesn't show the rings or weave any better than the first in my mind and without the other items to gauge its size against it's harder to grasp what part of the weave we're looking at. In my mind the first crop does a better job of showing the weave. The crop is only 236px wider and 177px taller (before resizing) but that little bit makes a difference in the finished image.

Image: SCS_2_Compare_Crops.jpg

By the way, those are galvanized steel rings so they should have those dark blotches and look horrible but had I stabilized my camera properly, the blotches and streaks of light would have been much clearer.

8. Troubleshooting

What if you're not getting to that 100kB mark?

-Make sure you did resize the image to 800x600. The resolution of the image is listed above the menu bar (top bar where Min,Max and Close button are). You can also go back into Image > Scale Image... and see the values there.
-The more white in your image, the larger the file size will be. Retake the photo on a black background to save file space.
-Go back to the original image and try cropping a smaller section of the image.

9. Conclusion

I hope that was easy enough. With any luck you've managed to get your image(s) saved, you now know how to crop and resize images in GIMP and you've learned a few tips on how to improve your images. So what are you waiting for, show us your stuff. Head on over to the gallery and submit your image(s) or post them to the forums, How to show a picture on the forums.

I'm certainly no photographer and my knowledge of proper image composition is minimal but I've learned a few things over the years, allowing me to get “usable” and on occasion “good” images. Most of it is fairly easy stuff like, lots of light, the proper angles, the proper use of focus and a steady camera. Watch a few videos on-line about photography, read a few photography guides or take a photography course. One of the best videos I've seen recently was by Andrew Price over at, called “Mastering Lighting in Blender”. If you use Blender, it's extra useful but even if you don't ever plan on using Blender it's a very good explanation on how lighting works, how we as humans perceive light and where we “like” to see it. It's long at 40 minutes but well worth the time. You'll have a much better understanding of just how big of an effect basic lighting can have on an image. Getting these rings to look (nearly) right was pretty easy after watching that video.

Image: Blender_Rings.jpg

That image was rendered at 1920x1080 but as you now know it's only a few steps to crop and resize it into something that can be used around here.

When you're done with that take some time and play around in GIMP, it's really quite impressive what you can do with it and because it's so widely used there are How-To guides all over the Internet. Hit a search engine and search for “using layers in GIMP”, which is probably the next thing you'll want to know how to use. You can also check out the tutorials from The GIMP Team on their GIMP Tutorials page to learn more about GIMP.

As always, if you have any questions, comments or concerns..., drop me a PM.

Original URL: