Jan 30, 2009

Nautilus-action : Generating thumbnails script


Still in my quest to find a smart way to generates thumbnails from a selected pictures I stumble on this nautilus-action script
Make thumbnails from selected images | GrumZ.Net

And then I pushed it a little further (code below) so it creates a thumbnail sub-directory and add a little blur effect (previously discovered in a previous post) -

Enough talk > here's the code :


#!/bin/bash
# ===========================================
# Thumb_export.sh
# ===========================================
# Script called by nautilus-action
# This script can handle multiple selection
# from various directories
# ===========================================
# REP = current directory path
# THB = thumbnail path and filename
# THB_SIZE = size of the thumbnail
# ===========================================
# version 0.02a
# Fri 30 Jan 2009 04:22:32 PM CET

THB_SIZE="184"

for f in "$@"; do
# extracting the current directory and create a thumbnail sub directory
REP=`dirname "$f"`"/thumbnail"
if `test -d $REP`; then echo "thumbnail dir already exists"; else mkdir $REP; fi
THB=`echo $REP`"/`basename $f`"
# now generates the thumbnail with
convert $f -thumbnail $THB_SIZE \( +clone -blur 0x3 +level 20%,100% \) \
\( +clone -gamma 0 -shave 10x10 \
-bordercolor white -border 10x10 \) \
-composite \
\( +clone -gamma 0 -shave 10x10 \
-bordercolor white -border 1x1 \
-bordercolor black -border 9x9 \) \
-compose screen -composite \
$THB
done

xmessage "OK, it's done"

NB : I do not pretend to be a brilliant shell developer ; so be careful when using this code, the dozen of tests I performed with it (with multiple selection (across various directories), jpg, png, etc ...) worked, so I can say that nothing terrible (or funny) should happened.

But of course, if you're a shell wizard - I would totally appreciate your comment or help.

Jan 26, 2009

RPG scenario generator (2)

Following my post (myMix: RPG scenario generator (1)) about creating a spreadsheet for RPG scenario - this is the script here to download OpenOffice spreadsheet (compatible with Google docs)



Jan 22, 2009

Google Theme Maker

Easy to use and quite handy tool to make customized "google homepage" - that could match the wallpaper desktop for example.

The tool is here > Google ThemeMaker
And a step by step article is here > at lifehacker.com













Jan 21, 2009

Image*After


A cool website offering Public domain photos (with lots of textures)

Image*After : images : wallpaper

Inochi


It happens not very often, but that is always nice - when someone send me an email - saying "thanks, for your nice vector clip contribution posted on Openclipart, I will use this clipart for my book / project / logo - how would you like to be credited ?"

The last time it was this 3 flowers clipart - that a kind developer has merged with the word "Inochi" (which is the Japanese word for "life").

More information there Inochi 0.1.0

NB : All posts on Openclipart are Public domain - which mean that people using it doesn't even need to says anything to the "artist" - that's why I really appreciate those people who takes time to send a kind email such as this one.

Jan 20, 2009

Battleon (part 4) and ... conclusion


Well, it seems I won't get any further with my Battleon (see part 1, 2, and 3) adventures, because ... of the message on the left > current limit of all 7000 spots for free online players are currently in use < I know by experience that the number of players is nearly 8000 everyday.

So ... fair enough !

You can beat dragons, wizards, etc ... but you can't compete with that.

AdventureQuest Game over

imagemagick script for thumbnails


Goodie, goodie - another try with imagemagick scripting - This time, the purpose is to generate thumbnail(s) with fixed width and with some little blur around the pictures ... just like the picture on the left.

Why ? because I'm using "phpwebgallery" and they recommend to generate the thumbnails externally before sending them over ftp to the website - to have the thumbnails in a sub-folder.

Anyway here's the script I made "export_thumb.sh"

#!/bin/sh
# export_thumb.sh
# ------------------------------------
# using imagemagick this script has to be launched from within
# the directory with your pictures (in jpg format) and it will
# exports thumb files 184 width in a sub directory named "thumb"

# create sub folder if it's not created already
if `test -d thumb`; then echo "thumb exists"; else mkdir thumb; fi

for i in *.jpg;
do
convert $i -thumbnail "184" \( +clone -blur 0x3 +level 20%,100% \) \
\( +clone -gamma 0 -shave 10x10 \
-bordercolor white -border 10x10 \) \
-composite \
\( +clone -gamma 0 -shave 10x10 \
-bordercolor white -border 1x1 \
-bordercolor black -border 9x9 \) \
-compose screen -composite \
thumb/$i
echo ".\c";
done
xmessage "OK ! script ended with Success";

There's a lot of other good examples on this page Thumbnails -- IM v6 Examples

Lux Kassidy and Linux


Her name is Lux Kassidy, she is a blond top model and she talks proficiently about ... Linux

Lux Linux 101 on Flickr - Photo Sharing!

Following the comic page about the financial crisis explained by Jesse Jane some more have been made, and I think it's great - I hope there will be more...

Jan 15, 2009

RPG scenario generator (1)




















Now for something completely different, spreadsheets ... ;)

A few weeks ago, I had some nostalgia over the good old time of role playing game (rpg) like AD&D and created 2 maps - and a quick scenario.

But I wanted to develop something funnier, a sort of "rpg scenario generator" the idea was simple - using a generic sentence such as "In terrain_type the group will have to scenario_quest fighting against evil_boss and his army of evil_monster ; etc ..."
I would use a random number for each field (terrain_type, scenario_quest, etc ...) and voila ! pressing recalculate would generate a new scenario ... no more lack of Dungeon Master's inspiration.

First I thought using java, perl or python that would read a xml file - then deduce the number of xml file entry, from this number - select a random number and then print the selection - that would do the job ... xml would be great as I would be able to add new lines, and no need to modify the source.

But then (because of my lack of knowledge of perl, java, python ...) and since a spreadsheet such as openoffice Calc, Excel, or google doc would be as good to do the job.
I started a basic sheet using max(), vlookup() and randinbetween(). And it works !!!

Also in the process I found a very nice google doc feature that doesn't exist elsewhere and that is the "filter()" function (see the picture above - for a comparison with the more "standard" vlookup() function).

As you can see on the pictures, it's just a proof of concept - the yellow cell contains the random number (from 1 to max()) of the item's column - the blue cell contains the result - that will be used to build the "one sentence" rpg scenario.

Functions : Function list - Google Docs Help Center

Jan 14, 2009

Battleon (part 3)


Erh ... I'm still playing - sort of ... Actually the game isn't that bad, and there is a bit of strategy during the fight (I have to confess that until level 15 I was pretty much pressing the big "Attack" button without thinking).

But the higher the level, and the longest the fight became, so it was time to investigate and ... moving the mouse over the opponent I just found the jackpot - there was the characteristics of the monster to fight - with various ratios for all elements (the Element Modifier section) and then it was easy to find the monster weakness - see for example on the left picture - this monster is particularly affected by Wind based attack - and would suffer 140% of such attack ; on the other hand he wouldn't be wise to attack him with Earth related weapon because this monster will only receive half the damage.

And there's a lot more on the Battleon forum AQ Help and Support

SLiM - Simple Login Manager


Maybe I never mentioned it - but I'm using Linux Debian and most of the time through virtual machine (virtualbox or vmware) - anyway part of the fun of using vms is that you can test a lot of package - and in this quest the benefits is often to get the fastest, more efficient vm you can - with the fewer package ; so it runs smoothly and isn't fat in terms of ram or space.

Anyway, my current environment is icewm and I was struggling to find a login manager to get along with it - I wanted something not too fancy (like gdm or kdm that mostly are used in correlation with respectively gnome or kde) - so I tested xdm first and wasn't impressed (it was ugly) but then I was advised to install slim - and yes, it rocks, it's easy to configure and is only one package to install - so fast, efficient - I adopted it immediately, and made (as a practical joke) a "vista-like" login (see picture on the left).

SLiM - Simple Login Manager

Jan 13, 2009

AIGA Design Archives


the AIGA (formerly an acronym for the "American Institute of Graphic Arts") is an American professional organization for design and their website is simply sumptuous ...

AIGA Design Archives

Jan 8, 2009

FileManager using tags


Tagging, is it the future of the file manager specie ? I don't know ... But I know for sure that wasting time searching for a file is very frustrating - especially in the middle of a creation.

Of course using filenames with a limited number of characters was fine until the average HD size reached around 80GB. Now it's getting more and more tricky to organize a collection.

Let say you are trying to setup a collection of clip-arts :
usually you start with a simple structure like characters, sceneries, items.
But then you want to get in more details : face, signs, outline
and where do that fit ?

That's why (I guess) tagging is the best way to get organized (and that's probably the reason why openclipart.org is using tags too !).

And recently I found that dream tool ; it's named "tracker" - and after 3 days of testing I'm quite happy with it, because it is very intuitive, and offer a lot of flexibility in organizing a collections of pictures, textures, outline, portrait, black and white, cartoon, scenery etc ... The perfect companion for Inkscape.

Meta Tracker - tracker-project.org

Jan 7, 2009

Mon beau sapin (2)

Before Christmas I was mentioning a French website launched for charity (to help children having presents on Christmas eve) - it turns out the project was a complete success and the author has gathered around 60,000 euros and wants to express a big THANK YOU !

See her message on her website Mon beau sapin (in French obviously)

Jan 6, 2009

Picasa for Mac: Free download from Google


A bit late for a christmas gift ...

Good news everyone, Picasa for mac is available for download.

Picasa for Mac: Free download from Google

It was already available for Windows and Linux - and because of iPhoto (?!) there was no version for mac users.

Jan 5, 2009

Popeye is free


Yep, yep ... Popeye is copyright free (at least in Europe)
and is already on Open Clip Art Library Popeye

What does that mean ?

Anyone can print and sell Popeye posters, T-shirts and even create new comic strips, without the need for authorisation or to make royalty payments.
see this link for more details.

Jan 2, 2009

Battleon (part 2)



Yep, still playing ... created 2 characters, one is 14th level fighter the other one is 12th rogue - but really it doesn't make any difference.

It's funny how the monster design can vary from awesome to really crappy. Same stand for the background -

There are some funny stuff coming from time to time, I had to fight a seal on a beach who was throwing a beach ball on my head as a ranged attack -

Also had to fight the Duke of Hazard (a lizard with some paint impersonating a car from the well-known serie) see picture below :


Then later I had to fight a "sunray" ; (yeah ... very inventive a piece of sunshine attacking you and you don't have any sun cream nearby) - it was funny because Artix (a Paladin that will assist you on your first combats) when he slashed that monster was actually healing him - the combat was impossible to finish ... I don't know if that was a bug or a feature - but I had to flee !

Unfortunately for me ... I'm starting to understand the term "Grinding" more than ever - I guess my quests won't past level 15 - we'll see...

Popular Posts