Image Editing

Tags:

Digital Image Editing

Like they have done with virtually every facet of society they've come in contact with, computers have exponentially increased our ability to store, process, share and manipulate images.   Here, I'll briefly cover some of the functions, methods and techniques which can be used for creating and editing images of various digital formats. 

Vector versus Raster

Computer graphics come in two flavours--raster and vector.  Raster graphics are traditional bitmaps--a grid consisting of an x axis and y axis, the intersections of which are individually coloured so as to make a two dimensional array of dots, which can be coloured into a picture.  Easy, right?  Higher the resolution (the more dots that make up the picture), the smoother it'll look, and the further you can zoom in without making it look like a NES game.  

Vector graphics, on the other hand, can be zoomed indefinitely.  That's because they are rendered (or drawn) each time they're displayed.  Instead of saving the info about what colour each dot on a grid is, vector graphics store the mathematical information required to generate the shapes which make up the picture.  So, if you've got a vector-based picture of a circle, it really is a circle.  If you zoom in again and again, it's still going to draw that curve the same way.  

Vector graphics don't have this inherit limitation of resolution that raster has, but we're still not quite perfect at making these vectors do what we want them to.  Raster graphics are much easier to implement, and not only that, but all of our inputs are sort of cutting things up into dots anyway.  

Think about it--when you pull out your camera and take a picture, the light is coming through the aperture, being focused by the lens onto the sensor array, where each individual element records what colour of light it is perceiving.  All the dots grab their colour, and the whole thing's collected as a bitmap.  Even film and our eyes have a resolution (in film, it's called grain, and with your eyes, the resolution is limited by the number of cells there in your retina, picking up light).  

Consequently, we (humans) tend to use a lot more raster graphics than vector, so far, but they both have their purposes and vector techniques are getting better all the time.  

Colourspaces

Another concept most people don't often think about is that of colour spaces, or the number of possible colours which can exist, be perceived, or be represented in some sort of number system for encoding.  

Most people have three kinds of colour sensing cells in their eyes (called trichromats).  Since nobody can exactly count and report how many colours they are able to perceive, people have done experiments and estimates putting people on average, about ten million colours or so.  

It has been put forth that some people, have an extra colour sensor cell in their eyes (called tetrachromats), and can see exponentially more colours than average humans.   

Anyway, one of the most common colourspaces is 24-bit RGB.  You take 2 to the 8th three times (one for red, one for blue, and one for green) and mix the values into different combinations of colours.  About sixteen point seven million colours.  

Image Formats

Compression

Over the years, many different formats (or rules on how a certain image-type works internally) have developed.  The internet (and other influences) pushed some of these formats into smaller and smaller packages to end up with less data to transfer.  Many of these compression technologies are known as lossy (because they cause overall image quality degradation).  The most famous of these is probably JPEG.  

In a given image, there are likely colours (in that colourspace) not being used as well as colours the average human eye cannot perceive.  So, to make the file smaller, these extra bits of data are just thrown away.  This is how so-called lossy compression works 

Transparency

Transparency is basically just what it sounds like--certain image formats can have transparency.  A transparent piece of an image shows whatever is below it (e.g. when you change the background colour, all the corners of the icons on your desktop still show the correct background colour).  Transparency is nice for a variety of reasons, but primarily because it 'plays nice with other content'.  

Layers and Opacity

Some image formats actually hold more than one image, which sort of get stacked up into layers.  Using transparency or opacity (opacity controls how translucent something is), certain parts of images are able to affect  those above and below.  The whole image works together as one, but is made up of different pieces, all stacked up and blended together.  

It's important to note that these formats typically are for the development process.  To become a bitmap, the layers of the image must all be 'flattened'.  The actual resulting image after the flattening process is basically a snapshot of how all the layers looked together.  

Animation

Some image formats also have the ability to display multiple frames in order to create animation effects.  One of the first popular formats for images on the Web was GIF, which (through its variations) had the potential for both transparency and animation.  

Some Common Formats - (By File Extension)

BMP - OS/2 / MS Windows Bitmap

JPG/JPEG - Joint Photographic Experts Group - Lossy compression, pretty good for photos

GIF - Graphics Interchange Format - Compuserve Bitmap - Supports transparency and animation, up to 256 colours

PNG - Portable Network Graphics - Lossless compression, transparency, created as a replacement to GIF

MNG - Multi-image Network Graphics - Extension to PNG which supports animation

TIFF - Tagged Image File Format - Not really an image format itself, TIFF is a container which can hold other images

XCF - eXperimental Computing Facility - XCF is the native file format for GIMP (a free image editor) Supports Layers, Channels, Etc.  

RAW - Higher end digital cameras can save what's known as a RAW file - This is the data received by the sensors, not yet processed into an image format.  This is analogous to a negative in a film camera, and provides more flexibility in altering the image.  

Image Editing Software

Modern image editing software provides a number of tools which work similar to real-world counterparts.  Some examples include the Paintbrush tool, which creates fuzzier strokes similar to that of a paint brush, Pencil tools, which create hard, sharper lines, Shape tools, such as rectangle and ellipse, and on and on.  

The wonderful thing about doing this on computers, however, is that the tools don't have to follow the rules of the real world.  Good image editors will let you go under the hood of the image and start changing some of the rules which make it up--i.e. the levels of colours, brightness, contrast, etc.  

Many image editors also have a sweet feature called filters.  

Filters

An image filter is a mathematical process to alter the underlying image.  There are a number of filters out there which provide an astounding variety of results.  

Blur - self explanatory, blur mixes the values between neighboring pixels

Sharpen - just the opposite of blur

Warp - warp effects can be used to stretch and distort an image, add waves and ripples, etc.  

Lighting Effects - add light sources which interact with your image

Colorize/Colorify - alter an image so it's all done in shades of a particular colour

Colourmap Rotations - take a certain range of colours in an image and replace it with another

 

And on and on and on...  New filters are created all the time, and many can be combined in new ways to create a plethora of effects.  Filters can be used to enhance an image, to make it look more hand-drawn, or cartoonish, or to clean up a photo, etc.  

Some Software

Adobe Photoshop - Photoshop has become basically the standard for commercial image editing, it comes in a variety of releases editions with prices ranging.  Supports most formats, several colourspaces, and many advanced features, including support for third-party filters and plugins.  

GIMP - GNU Image Manipulation Program - Free as in speech (and beer), GIMP is a wonderful tool both to learn on, and to do professional work (depending on what you're doing).  GIMP has many features similar to Photoshop (such as layers, filters, scripting, multiple file formats, etc.), GIMP lacks support for some of the more advanced color spaces, so in some circumstances will not work (but 9 times out of 10, you won't need this for starting--when you need bigger colourspaces, you'll know).  

Paintbrush - Microsoft Windows basic image editor--compared with the above two, it is a joke, and I include it here only to provide some contrast between the classes of these type of programs.