Sunday, August 16, 2009

Stellarium libjpeg microbug in Archlinux

Minutes ago "dreaming of a telescope" I did what Galileo did 400 years ago, when, in 1609, pointed one of the first basic refractors telescopes upwars to the sky, towards Jupiter, discovering its 4 main satellites (that afterwards were called after him as "Galileian Satellites").

I took my dear old scope and I aimed it to the brightest object of tonight's sky (even from this desert Milan but photo-polluted as usual): a great Jupiter of -2 mag and something more with Ganimede at mag 4 in the top left of the ocular.

Yeah... but for knowing it was Ganimede I needed the awesome Stellarium.

I started the program but it said that without libjpeg.so.62 it wouldn't start. :-(

Then I tried to symbolic linking as "libjpeg.so.62" the libjpeg I have installed by default in Archlinux that's version 7:

$ sudo ln -s /usr/lib/libjpeg.so.7 /usr/lib/libjpeg.so.62

No way :-(

So I had to remove the just created link to clean:

$ sudo rm /usr/lib/libjpeg.so.62

.. and search with yaourt if version 6 is still available on aur.

Luckily it is! Bingo! After building and installing "libjpeg6" package from aur Stellarium worked!

... and everyone lived in happiness even if with two versions of the same library installed :-)

Goodnight and keep on hacking ;-)

bYe,
Andy

Sent from my iPhone

Gimp Colorize: I couldn't get it

Last days I fought with Gimp's Colorize tool. To understand what was the generated color I studied again color spaces pages on wikipedia, as I already did some years ago.

The tool did't shocked me because its use of HSL color space (with google you can find many RGB, HSV, HSL converters, even online). I was disappointed because in this tool Luminance has a -100 - +100 grade instead of a 0 to 100 one.

So I tried to recover the "true" value by means of a proportion, after I tried with sums and differences, and at last I merged some HSV and some HSV values because HSV Saturation made more sense than the same saturation from HSL.

Anyway there was nothing to do: the recoloured region was of the same hue (so H parameter was right) but the resulting color was clearly differente with respect of my desired color.

The only solution I found to colorize the blurred pattern (so I couldn't use effectively the magic wand) I was interested in, was a mask creation on that layer using the image itself as source. After that I applied a convenient background color to all the layer and the mask did the rest.

In this way the result was what I wanted but this strategy worked only because of the kind of the particular image I wanted to colorize. Because of this, I'm really curious about to know where I made my color conversion mistake with the colorize tool and if some of you readers worked out this problem. ;-)

On the net there is not so much about this issue, since the problem reveals itself only when the user wants a specific color and tries to put it inside the tool via the HSL digits. It one works manually and "by eye" everything is acceptable but the "bug" remains.

Okay... I hope that someone could get through this issue, bug or simply mistery and tell me how much I am "idiot" GIMPly speaking :-P

bYez,
Andy

Sent from my iPhone

Wisdom pearls

Yesterday I had to rename with a unique and chronological code some photos made by different cameras but among the same holidays.

I remembered about the EXIF informaztion set which is inside any camera-generated jpg file... and I remembered of a tool to work with these information.

So I installed exiv2 on my Arch box and with a rapid sight to the "man" I was ready to batch renaming all the pictures. I thought I would have been quite complicated but it worked like a charm! Here you are the command:

On a terminal, once you are in the folder containing the photo to be renamed, you have to do only:

$ exiv2 mv ./*.jpg

It's incredible how rapidly is done a work that could take a full day for a human! All the pictures in the folder are now renamed witha strandard patterna like the following:

YYYYMMDD_hhmmss.jpg

So now instead of having different folder for different cameras to prevent to overwrite or mess up the pictures, you have all the photos in the same place and time-tagged.

But there is some issue because anything could be perfect.

First of all, this program doesn't work with the movie files, so you will have to rename them manually.

The real problem is, anyway, when we do more than 1 shot per seconds (multiple shot feature of professional cameras) or when we shot at the same time with the two different camera we are trying to merge.

However, being careful about these situations before the renaming and the merging of the folders the system works very well... if the time on set on the cameras is correct and more or less synchronized. If there will be a delay of some 5 minutes all the consequential order will be badly disrupted.

For the windows users: I didn't check if there is such an EXIF utility for your OS... but I'm quite sure I will be... at most it won't be free of charge... but that's your way to think sofware doesn't it? :-P

Make nice pictures and Have good holidays!

bYe,
Andy


Sent from my iPhone