Tag: image

Short script to add a timestamp on pictures

Here is a short script (1.6kb) to add a timestamp on all PNG pictures in a directory. It requires Python and the Python Image Library (PIL). In order to use it, modify some parameters in the beginning to suit your needs (images directory, font file and size, etc.) and launch ./timestampFiles.py. Here is a before/after example (size of pictures is reduced to fit in this blog):

Before/after example of adding a timestamp to a picture

Note 1: the font is not included in the script. Here, I used FreeSans which is a true free font (GNU GPL with font exception). It is available here (local copy, just the FreeSans font, 753kb).

Note 2: I chose to convert PNG images to JPG ones for 2 reasons. First, my capture script gives me PNG images (see previous posts). Second, I want to be able to copy all JPG pictures in a MJPEG movie. It shouldn’t be difficult to change the different file formats to suit your needs (ask me if you can’t do that).

Note 3: I guess this would also have been possible using a bash script and imagemagick, Perl or any other programming language 😉

Vertical badge

vertical number of days without Belgian governmentI was writing the next version of my badge counting the number of days without Belgian government when Laurent added his comment requesting for a vertical version. You can see it on the right.

Since the original release, I also added translation of the sentence in Dutch and German (after all, Belgians are speaking 3 official languages). And I approximately centered the text on the vertical version (I personally prefer the text on the right for the horizontal version but you can easily modify this by yourself).

As usual, here is the HTML code to include this vertical version in your page, blog, etc.:

<img src= "http://www.epot.org/belgov/belgovv.php" alt="belgov counter on epot.org" />

And here is the source code (for both version): belgov-0.3.tar.gz (20kb).

How many days without governement?

Now it’s not a secret anymore: more than 148 days passed since we, Belgians, went to vote (it was on the 10th of June 2007) and we still don’t have any government!

If you want to count the numbers of days without Belgian government, it’s easy: just have a look at Belgian newspapers. Or … have a look at the counter below (in French, Vlaams or German) 😉

belgov counter on epot.org

And if you want the same on your website or blog, it’s very easy, just copy/paste the HTML code below:

<img src="http://www.epot.org/belgov/belgov.php" alt="belgov counter on epot.org" />

Enjoy!

P.S. For those who could be interested, here is the source code: belgov-0.2.tar.gz (6kb). It’s written in PHP and under the GNU GPL (so it’s free!). Each small animal (Lion of Flanders or Rooster of Wallonia) represents 2 days without government. On the last line, there is a small gradation of transparency.

P.P.S. If you want to specifically support the unity of Belgium (because quite a number of politicians and citizens want to split Belgium), Pilok has a “I love Belgium” banner. Here I just wrote a counter of days without government, whatever your opinion is about Belgium.

Edit on Nov. 7th: I added translations in Vlaams and German for the line on the bottom.

Contamination!

Last week, our proteomic group did a 2D of a purified protein but, unfortunately, it seemed we had a contamination. So, this week-end, we performed blank tests in order to see if the contamination came from our experiment (or from the purification). We tested our fluorescent markers and different 1D strip holders. At a normal gain, the image looks fine: contamination doesn’t come from the 2D

But when I increase the gain, the image (and thus our gel) is really contaminated! 😦 We really have to look where did the contamination happen! Look at this:

In France the person fooled is known as poisson d’avril. This has been explained as arising from the fact that in April the sun quits the zodiacal sign of the fish. The French traditionally celebrated this holiday by placing dead fish on the backs of friends. Today the fish has been replaced with paper cut-out.
(Explanation from Wikipedia)