Saturday, 16 October 2010

Transforming pictures in Linux

I use GNU/Linux for most of my computing needs. This includes manipulating photos I upload to this blog. I could open each image one by one in GIMP, resize them, and then save them with the new file name - but that would be time consuming and monotonous. With the use of the Imagemagick command line tool set, and the Linux command line, I've found a way to script up the renaming and resizing of the images.

Here are the steps:
1. Transfer the images from your camera to the computer. Linux is very USB aware, and when I plug in my camera, it offers to either start an instance of a photo viewer, a visual file browser, or do nothing. I choose to open the visual file browser, so I can drag and drop the image files onto a directory / folder on my desktop. Here are those files:Images before transformation2. Next is to open up a command line, and run some commands. Some of the commands are important, some can be ignored. I will start by going into the directory and checking if the files are there:
evilric@hawk:~/Desktop/fake_air_jordan_VIs$ ls
DSC05049.JPG DSC05056.JPG DSC05063.JPG DSC05070.JPG DSC05077.JPG
DSC05050.JPG DSC05057.JPG DSC05064.JPG DSC05071.JPG DSC05078.JPG
DSC05051.JPG DSC05058.JPG DSC05065.JPG DSC05072.JPG DSC05079.JPG
DSC05052.JPG DSC05059.JPG DSC05066.JPG DSC05073.JPG
DSC05053.JPG DSC05060.JPG DSC05067.JPG DSC05074.JPG
DSC05054.JPG DSC05061.JPG DSC05068.JPG DSC05075.JPG
DSC05055.JPG DSC05062.JPG DSC05069.JPG DSC05076.JPG
The command is "ls" to list the contents of the directory. It is optional. Keep in mind these are all the original sized images, directly from the camera, taken in 7 megapixels - 3072 x 2304. With limited space on servers, and limited bandwidth, the idea is to reduce them all to 1024 x 768 as well as renaming them to something more readable.
3. Check to see the space used by this directory:
evilric@hawk:~/Desktop/fake_air_jordan_VIs$ du -sh
81M .
The command is "du" with the "-sh" flags. It is optional. The output says that all the files consume 81 megabytes in storage.
4. Now run mini-script to convert the images and rename them at the same time:
evilric@hawk:~/Desktop/fake_air_jordan_VIs$ myCount=0;for i in $(ls); do echo "$i -> fake_air_jordan_VIs_$myCount.jpg"; convert $i -resize 1024x768 fake_air_jordan_VIs_$myCount.jpg; myCount=$[$myCount+1];done; for i in $(seq 0 9); do mv fake_air_jordan_VIs_$i.jpg fake_air_jordan_VIs_0$i.jpg; done
DSC05049.JPG -> fake_air_jordan_VIs_0.jpg
DSC05050.JPG -> fake_air_jordan_VIs_1.jpg
DSC05051.JPG -> fake_air_jordan_VIs_2.jpg
DSC05052.JPG -> fake_air_jordan_VIs_3.jpg
DSC05053.JPG -> fake_air_jordan_VIs_4.jpg
DSC05054.JPG -> fake_air_jordan_VIs_5.jpg
DSC05055.JPG -> fake_air_jordan_VIs_6.jpg
DSC05056.JPG -> fake_air_jordan_VIs_7.jpg
DSC05057.JPG -> fake_air_jordan_VIs_8.jpg
DSC05058.JPG -> fake_air_jordan_VIs_9.jpg
DSC05059.JPG -> fake_air_jordan_VIs_10.jpg
DSC05060.JPG -> fake_air_jordan_VIs_11.jpg
DSC05061.JPG -> fake_air_jordan_VIs_12.jpg
DSC05062.JPG -> fake_air_jordan_VIs_13.jpg
DSC05063.JPG -> fake_air_jordan_VIs_14.jpg
DSC05064.JPG -> fake_air_jordan_VIs_15.jpg
DSC05065.JPG -> fake_air_jordan_VIs_16.jpg
DSC05066.JPG -> fake_air_jordan_VIs_17.jpg
DSC05067.JPG -> fake_air_jordan_VIs_18.jpg
DSC05068.JPG -> fake_air_jordan_VIs_19.jpg
DSC05069.JPG -> fake_air_jordan_VIs_20.jpg
DSC05070.JPG -> fake_air_jordan_VIs_21.jpg
DSC05071.JPG -> fake_air_jordan_VIs_22.jpg
DSC05072.JPG -> fake_air_jordan_VIs_23.jpg
DSC05073.JPG -> fake_air_jordan_VIs_24.jpg
DSC05074.JPG -> fake_air_jordan_VIs_25.jpg
DSC05075.JPG -> fake_air_jordan_VIs_26.jpg
DSC05076.JPG -> fake_air_jordan_VIs_27.jpg
DSC05077.JPG -> fake_air_jordan_VIs_28.jpg
DSC05078.JPG -> fake_air_jordan_VIs_29.jpg
DSC05079.JPG -> fake_air_jordan_VIs_30.jpg
This command is the what does the conversion. I have written it all on one line, but I am sure you could have this in a nicely formatted script. I am being lazy here. The script resets the counter at 0, and for each item it finds in the directory, it will resize it, and rename it. The second loop in the line makes the first 10 files have an additional 0 in their file name. This is only to allow listing them in order, and does not affect the files at all. This step is NOT optional.
5. You now have the new files and the old files in the one directory. You can stop at this point, and just use the new files. Additionally you can check that the files have been transformed:
evilric@hawk:~/Desktop/fake_air_jordan_VIs$ ls -alh
total 93M
drwxr-xr-x 2 evilric evilric 4.0K 2010-10-16 01:06 .
drwxr-xr-x 14 evilric evilric 4.0K 2010-10-16 00:34 ..
-rwxr-xr-x 1 evilric evilric 2.9M 2010-10-12 11:31 DSC05049.JPG
-rwxr-xr-x 1 evilric evilric 2.7M 2010-10-12 11:31 DSC05050.JPG
-rwxr-xr-x 1 evilric evilric 2.9M 2010-10-12 11:32 DSC05051.JPG
-rwxr-xr-x 1 evilric evilric 2.7M 2010-10-12 11:32 DSC05052.JPG
-rwxr-xr-x 1 evilric evilric 2.9M 2010-10-12 11:33 DSC05053.JPG
-rwxr-xr-x 1 evilric evilric 3.0M 2010-10-12 11:33 DSC05054.JPG
-rwxr-xr-x 1 evilric evilric 2.6M 2010-10-12 11:34 DSC05055.JPG
-rwxr-xr-x 1 evilric evilric 2.7M 2010-10-12 11:34 DSC05056.JPG
-rwxr-xr-x 1 evilric evilric 2.3M 2010-10-12 11:35 DSC05057.JPG
-rwxr-xr-x 1 evilric evilric 2.4M 2010-10-12 11:35 DSC05058.JPG
-rwxr-xr-x 1 evilric evilric 2.6M 2010-10-12 11:35 DSC05059.JPG
-rwxr-xr-x 1 evilric evilric 3.2M 2010-10-12 11:36 DSC05060.JPG
-rwxr-xr-x 1 evilric evilric 2.7M 2010-10-12 11:36 DSC05061.JPG
-rwxr-xr-x 1 evilric evilric 2.6M 2010-10-12 11:37 DSC05062.JPG
-rwxr-xr-x 1 evilric evilric 2.8M 2010-10-12 11:37 DSC05063.JPG
-rwxr-xr-x 1 evilric evilric 3.3M 2010-10-12 11:38 DSC05064.JPG
-rwxr-xr-x 1 evilric evilric 3.2M 2010-10-12 11:38 DSC05065.JPG
-rwxr-xr-x 1 evilric evilric 2.0M 2010-10-12 11:38 DSC05066.JPG
-rwxr-xr-x 1 evilric evilric 2.3M 2010-10-12 11:39 DSC05067.JPG
-rwxr-xr-x 1 evilric evilric 2.1M 2010-10-12 11:39 DSC05068.JPG
-rwxr-xr-x 1 evilric evilric 2.0M 2010-10-12 11:39 DSC05069.JPG
-rwxr-xr-x 1 evilric evilric 2.1M 2010-10-12 11:39 DSC05070.JPG
-rwxr-xr-x 1 evilric evilric 2.6M 2010-10-12 11:40 DSC05071.JPG
-rwxr-xr-x 1 evilric evilric 2.4M 2010-10-12 11:40 DSC05072.JPG
-rwxr-xr-x 1 evilric evilric 2.4M 2010-10-12 11:40 DSC05073.JPG
-rwxr-xr-x 1 evilric evilric 2.3M 2010-10-12 11:40 DSC05074.JPG
-rwxr-xr-x 1 evilric evilric 2.7M 2010-10-12 11:41 DSC05075.JPG
-rwxr-xr-x 1 evilric evilric 3.0M 2010-10-12 11:41 DSC05076.JPG
-rwxr-xr-x 1 evilric evilric 2.9M 2010-10-12 11:42 DSC05077.JPG
-rwxr-xr-x 1 evilric evilric 2.5M 2010-10-12 11:42 DSC05078.JPG
-rwxr-xr-x 1 evilric evilric 3.3M 2010-10-12 11:44 DSC05079.JPG
-rw-r--r-- 1 evilric evilric 426K 2010-10-16 01:04 fake_air_jordan_VIs_00.jpg
-rw-r--r-- 1 evilric evilric 390K 2010-10-16 01:04 fake_air_jordan_VIs_01.jpg
-rw-r--r-- 1 evilric evilric 435K 2010-10-16 01:04 fake_air_jordan_VIs_02.jpg
-rw-r--r-- 1 evilric evilric 437K 2010-10-16 01:04 fake_air_jordan_VIs_03.jpg
-rw-r--r-- 1 evilric evilric 462K 2010-10-16 01:04 fake_air_jordan_VIs_04.jpg
-rw-r--r-- 1 evilric evilric 499K 2010-10-16 01:04 fake_air_jordan_VIs_05.jpg
-rw-r--r-- 1 evilric evilric 378K 2010-10-16 01:04 fake_air_jordan_VIs_06.jpg
-rw-r--r-- 1 evilric evilric 374K 2010-10-16 01:04 fake_air_jordan_VIs_07.jpg
-rw-r--r-- 1 evilric evilric 328K 2010-10-16 01:04 fake_air_jordan_VIs_08.jpg
-rw-r--r-- 1 evilric evilric 353K 2010-10-16 01:05 fake_air_jordan_VIs_09.jpg
-rw-r--r-- 1 evilric evilric 402K 2010-10-16 01:05 fake_air_jordan_VIs_10.jpg
-rw-r--r-- 1 evilric evilric 452K 2010-10-16 01:05 fake_air_jordan_VIs_11.jpg
-rw-r--r-- 1 evilric evilric 384K 2010-10-16 01:05 fake_air_jordan_VIs_12.jpg
-rw-r--r-- 1 evilric evilric 395K 2010-10-16 01:05 fake_air_jordan_VIs_13.jpg
-rw-r--r-- 1 evilric evilric 408K 2010-10-16 01:05 fake_air_jordan_VIs_14.jpg
-rw-r--r-- 1 evilric evilric 451K 2010-10-16 01:05 fake_air_jordan_VIs_15.jpg
-rw-r--r-- 1 evilric evilric 479K 2010-10-16 01:05 fake_air_jordan_VIs_16.jpg
-rw-r--r-- 1 evilric evilric 287K 2010-10-16 01:05 fake_air_jordan_VIs_17.jpg
-rw-r--r-- 1 evilric evilric 352K 2010-10-16 01:05 fake_air_jordan_VIs_18.jpg
-rw-r--r-- 1 evilric evilric 305K 2010-10-16 01:05 fake_air_jordan_VIs_19.jpg
-rw-r--r-- 1 evilric evilric 259K 2010-10-16 01:05 fake_air_jordan_VIs_20.jpg
-rw-r--r-- 1 evilric evilric 293K 2010-10-16 01:05 fake_air_jordan_VIs_21.jpg
-rw-r--r-- 1 evilric evilric 366K 2010-10-16 01:05 fake_air_jordan_VIs_22.jpg
-rw-r--r-- 1 evilric evilric 334K 2010-10-16 01:05 fake_air_jordan_VIs_23.jpg
-rw-r--r-- 1 evilric evilric 330K 2010-10-16 01:05 fake_air_jordan_VIs_24.jpg
-rw-r--r-- 1 evilric evilric 310K 2010-10-16 01:05 fake_air_jordan_VIs_25.jpg
-rw-r--r-- 1 evilric evilric 381K 2010-10-16 01:05 fake_air_jordan_VIs_26.jpg
-rw-r--r-- 1 evilric evilric 429K 2010-10-16 01:05 fake_air_jordan_VIs_27.jpg
-rw-r--r-- 1 evilric evilric 423K 2010-10-16 01:06 fake_air_jordan_VIs_28.jpg
-rw-r--r-- 1 evilric evilric 390K 2010-10-16 01:06 fake_air_jordan_VIs_29.jpg
-rw-r--r-- 1 evilric evilric 459K 2010-10-16 01:06 fake_air_jordan_VIs_30.jpg
As seen in the size listing, the new files are considerably smaller.
6. At this stage, I will delete the original files from the directory, and check the space used:
evilric@hawk:~/Desktop/fake_air_jordan_VIs$ rm DSC050*
evilric@hawk:~/Desktop/fake_air_jordan_VIs$ du -sh
12M .
The reduction in size has gone from 81 megabytes to 12 megabytes. The final result is not noticeable in the file browser:
Images after transformation
Why do it like this? It is lazy, involves less keystrokes, and allows you step away for the computer for the 2 minutes (or so) it takes to transform the images. The alternative would be close to 10 to 15 minutes of manually opening images, clicking this and that, and then saving the result. If you have several hundred holiday pictures, you could run a similar script, and then process them all while you make and enjoy a coffee.

As mentioned on this blog page, you are more than welcome to copy the text, modify it, play with it, but if you pass it onto someone else, or publish it on your own web site / blog, then make a mention of me as the original inspiration.

Friday, 15 October 2010

The last pair of Air Jordan 6 Rings I will buy

I have recently obtained the last pair of Air Jordan 6 Rings (also known as Air Jordan 6ix Rings) I will ever buy - the Air Jordan 6 Rings HOF. The HOF stands for "Hall Of Fame", as these shoes were to commemorate the addition of Michael Jordan to the Hall of Fame for Basketball. I already have 3 other pairs of this same model, all in different colours. The white pair in the pictures in those posts are owned by KittyKat. All those previous mentioned are being used. KittyKat uses her every so often, and mine are on rotation - with the most used being the 5 teams model, followed equally with the Olympic model, and the Black / Varsity Red model. The HOF model will be "kept on ice" (ie. in storage and unused - "deadstock").

The shoe is a combination of 7 different Air Jordans:
This shoe is not to be confused with the Air Jordan VIs. They were apart of the inspiration of the 6ix Rings, but they are a different shoe overall. Reading on some of the shoe collecting forums out there, there is a subgroup of sneakerheads that absolutely hate the idea of shoes like the 6ix Rings, attributing them to Frankenstein's Monster. I do not agree with them. I do not like every "fusion" shoe, but this one I do.

Advantages of the 6ix Rings:
  • Many different colourways - including team specific models, as well as Player Exclusive models
  • Solid and stable feel
  • Excellent cushioning on heel
  • Roomy toebox
Disadvantages:
  • Not the lightest basketball shoe
  • Not much ventilation means that your feet will heat up
The disadvantages I have noted may be due to my direct comparison to the Nike Hyperfuse which I am wearing frequently. It will be hard for any shoe to be compared in the weight or the breathability in comparison to that shoe.

Air Jordan BoxAir Jordan 6ix Rings wrapping paperAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix RingsAir Jordan 6ix Rings

Many thanks to Premiumsoles369 for shipping these shoes to me.

Wednesday, 13 October 2010

Glow in the dark Nike Max Hyperize NFW

I recently obtained a pair of the Nike Air Max Hyperize NFW. The NFW stands for "No FlyWire" - FlyWire being a technology used by Nike to allow their shoes to be strong, yet light. I have not worn these shoes extensively, but here is a short list of observations:
  • Very comfortable with plenty of ankle support and generous room in the toebox
  • Use of the visible Air Max 360 cell (throughout the entire midsole of the shoe) gives a very spongy feel
  • Glow in the dark depends on how long you leave them in direct light for. I do not know which chemical it uses, but they "charge" by absorbing light, and glow in dark places. This maybe similar to how Super-LumiNova is used in watches, but I am unable to confirm it.
  • They do not have much in the way of venting, so these shoes will heat up your foot up quickly. I am drawing a direct comparison to the Nike Hyperfuse which I have been wearing continually at the moment.
One aspect I did note is that according to some sellers on Ebay, these shoes appear to be a "House of Hoops" exclusive. From my understanding, House of Hoops is a concept store that is established in some cities, and is established by Footlocker. Melbourne, Victoria has an unofficial House of Hoops in its Footlocker store in Swanston Street. The reality is that this shoe is available in any Footlocker store in Australia, not just at that one store on Swanston Street. It may have sold out in the USA, but it is readily available still in many stores in Australia. I have seen them already at 4 stores in the Melbourne area, as well as the Footlocker store in Canberra City.

In the following pictures I have used to illustrate this shoe, I have had to adjust the saturation in the "dark" pictures. Pictures taken in the dark are hard to do. These shoe glow very well, especially to the naked eye, but they were hard to capture on film. If you have these shoes, you can also attest to this.

Nike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal lightNike Air Max Hyperize NFW - normal light

Turn off the lights, and they'll glow...
Nike Air Max Hyperize NFW - glowing in the darkNike Air Max Hyperize NFW - glowing in the darkNike Air Max Hyperize NFW - glowing in the darkNike Air Max Hyperize NFW - glowing in the dark

Friday, 8 October 2010

KittyKat's Nike Free Run+

KittyKat recently got some new Nike Free Run+ sneakers / runners. I have have owned two different versions of the Nike Free running shoe (although I have yet to document either on this blog). The advantages of the shoe are:
  • Flexible sole allowing for "natural movement of the foot" to simulate bare foot running
  • Integration with a pedometer (from a "fruity technology company that also markets music")
  • Very light and comfortable shoe - requires no "break-in" period
The disadvantages of the shoe are:
  • Offers no real protection from anything being dropped on top of the foot (as the upper of the shoe is more like a sock)
  • Lack of impact protection (which requires the user to run on softer surfaces initially until they become used to the new movement)
  • Appears to be flimsy to some people (although this shoe appears to last as long as a regular running shoe)
As mentioned, I have already had two pairs of similar shoes, and I would recommend them with some conditions.
  1. Only run on grass or soft surfaces - this goes back to impact protection.
  2. If you must run on hard surfaces, run on soft surfaces for 3 to 4 weeks before making the transition to harder surfaces.
  3. Wear thin socks - as the shoe has a very snug and responsive fit.
I'm sure these images will give you a better understanding of what the shoe looks like:

Nike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free PlusNike Women Free Plus