Archive for December, 2009

Mamba Manners

The common green mamba found predominantly in the forests alGreen mambaong the eastern coast of South Africa is the smallest of the mamba family, averaging a mere 1.8 meters (5.9 feet) in length.

According to wikipedia they are shy and unaggressive creatures which seldom venture to the ground and, when threatened, usually just make a quick and elegant escape. 

Unfortunately for me, the one that I encountered on my holiday obviously had not read wiki for he conducted himself in a most inappropriate manner.  Granted, he had obviously been blown out of his treetop sanctuary by the wind that was whipping around us so I can understand his foul temper. 

I also have to acknowledge that he was probably further aggrieved by the fact that I was standing directly on his chosen route home but I really do not it was necessary for him to draw himself up to about knee height (as my knees are quite far from the ground I’m fairly certain he was an above-average specimen length-wise) and proceed to sway and lunge at me in a most threatening manner.

Fortunately I kept a cool head and, while shrieking at the top of my lungs, threw most of the contents of my tote bag at him.  Even more fortunately my aim is pretty awful and the flurry of objects landing all around him distracted him long enough for me to make a very unladylike getaway. 

Talking to a snake handler at a nearby reptile centre a few days later I was calmly assured that I had done completely the wrong thing, and, if I had managed to hit the snake he would most assuredly have bitten me.

So what should I have done? There are apparently three golden rules for negotiating with a snake:

  1. Stay very still.
  2. If the snake looks to be in a threatening position, back away slowly.
  3. Don’t make sudden movements or the snake may bite.

Whatever you do, definitely DO NOT throw your favourite pair of sunglasses at it because you will have to retrieve them at a later stage! 

Counting layers automatically in Adobe Photoshop

Counting layers in photoshop
Some time ago I decided there had to be a better way to count how many layers you have in your .psd file in Photoshop. Mostly because its interesting trivia but also because its probably a good idea to not to exceed a certain limit.

So why would layer count be important?

Well, the .psd filesize doesn’t really tell you much more than that the file is heavy. It doesn’t tell you why its heavy, could be because you work with high resolution images, advanced and extensive blending modes or it could be because you have a bizillion layers.

A bizillion layers – why not leave well enough alone?

If the latter is the case, you might need to consider removing a few or merging a few especially if you are a designer and other people are supposed to be able to make sense of your work and that person might not appreciate (perhaps sitting on a not so powerful computer) a ten minute waiting time just to open the file.

File with too many layers

This file is an export file for custom buttons on a web page, in this case the layer count could really take off. Having four states (default, featured, pressed and disabled) in 5-15 different languages – and we don’t want to merge them all since that would rob us from the graphics being usable in the future when our client wants to change something in the buttons (this file has about.. 3.5 thousand layers – almost not usable any more).
A screenshot of photoshop with a large .psd fileFile with many layers

Enough blabbering – how do I count them all?

A nice fellow named Kyle Tunney posted a script on his web site some time ago which does all this for you. Running the script on your photoshop file will prompt you with the exact layer count of your current photoshop file.

How to – Step by step

Download the script, note where you save it. Open your photoshop file and click ‘File’ -> ‘Scripts’ -> ‘Browse’.
counting layers tutorial 1

Find the script and load

Find the script you just downloaded and hit ‘Load’ and then ‘Yes’.
Prompt to really count layers of the file

Features

  • Counts all the layers of your file
  • Counts all groups and layer masks as well (since you you use groups for more than just structure and categorization – this works as intended

Problems with the script

  • Files over 100-200 layers might take time to count, you will probably think PS crashed
  • There is no progress bar letting you know how far you’ve gone in the counting
  • Loading the script and hitting ‘No’ (deciding you don’t want to count layers) will result in the script still counting your layers
  • Kyle doesn’t seem that into developing the script further (adding progress bar etc.), ill probably need to do that myself one day
Return top