Follow by Email

Friday, January 12, 2007

Xgl/beryl part 2 + ImageMagick

This is version 0.1.4 of beryl, the older post was version 0.1.1.

I NEVER used to mouse to make this single image from the screenshots.
Using the command line, I did 4 edits in these images.
  1. Resize each picture to 25% of its original size.
  2. Reduce quality of each picture to 60% (to reduce it from 200 KB per image to only 20 KB per image).
  3. Convert from PNG image format to JPG image format.
  4. Assemble these 6 images into one big image.
All that is done using only 2 lines in the command line. The convert tool is part of the ImageMagick package.
$ for myfile in ./*.png do
convert $myfile -resize 25% -qualilty 60% $myfile.jpg
done

$ convert -size 512x615 xc:skyblue \
Screenshot.png.jpg -geometry +0+0 -composite Screenshot-1.png.jpg -geometry +256+0 -composite \
Screenshot-2.png.jpg -geometry +0+205 -composite Screenshot-3.png.jpg -geometry +256+205 -composite \
Screenshot-4.png.jpg -geometry +0+410 -composite Screenshot-5.png.jpg -geometry +256+410 -composite out.jpg

10 comments:

Magdy Wageeh said...

Wow, Beryl Project is very cool...

Ahmed M. Farrag said...

ezzaher el computer beta3ak baz we ba2a ye2leblak el shasha... enta bass 3'ayyar el rama wel fana beta3et el brocessor (bel7a2 howwa cinnabon walla cilantrino?) we kollo 7ayeb2a tamam ya ma3lama.

Mohammad Nabil said...

magdy:
yep you gotta try it for yourself it is amazing :D, some feature can't be expressed unless in video lel asaf

mohammadeen:
ya2lebly el shasha ?? how many degrees law smaa7t ??
3eeb 3leek, dah dual donut :D
kollo 7ayb2a tmam ya7'chi :D

Mohammad Nabil said...

According to this web page http://applications.linux.com/article.pl?sid=06/12/22/169248&from=rss
ImageMagick was first developed year 1987 :'( when we were 1 year old!!

Ahmed M. Farrag said...

if it makes you feel any better, i was 0 years old then :D
nice (new) photo u've got there on ur profile ;)

Mohammad Nabil said...

There were some people under zero too however :D
Thanks, I've got that photo from Ramy's blog :D:D

Magdy Wageeh said...

I am one of those people that were under zero when it was developing…:D
I saw many videos of it on youtube

Ahmed Essawy said...

عشنا و شوفنا
:)

Mohammad Nabil said...

Btw, I've found another tool called ffmpeg that can do the same things on video :D
for example:
ffmpeg -i video1.flv video1.mpg
will convert from flv format to mpg format.
You also can resize etc. etc. etc...

Mohammad Nabil said...

Using this command I was able to convert every RealMedia file I have in a certain folder to MP3 :D

for F in *.ram *.rmm *.rm; do ffmpeg -i $F $F.mp3; done