The Archives
-
02.18.11Moving between encodings with emacsI live in Spain. I work at Academia. This is a problem. My School's computers are plagued with Windows (XP!), my pupils most certainly use Windows (I bet it is 7) and I use (obviously) an MBPro with Snow Leopard. Even more, my School's servers are Linux. This gives rise to latin-1, UTF-8 collisions. While writing some text-only documents for use with MATLAB (another problem, by the way) I realized I was going to need to convert them from my Mac's UTF-8 to Windows latin-1 every time I edited them. Time for a makefile. I am not commenting this though, only the ...
-
01.23.09Space forSo your friend sent you a batch of tiffs to be converted into jpg's (using ImageMagick's convert command). However your friend (who is not so geeky as you) uses spaces in filenames (which is a deadly sin), like in First photo of birthday.tiff Second photo.tiff You wanted to use a shell for loop, but the obvious $ for i in `find . -name *tiff` ; do convert "$i" "${i%tiff}jpg" ; done produces garbage (try it). This is just one of the consequences of your friend's carelessness. But there is a solution. IFS (Internal Field Separator) is a shell variable controlling what character(s) delimit a 'field' in ...
-
01.05.09ThumbnailsEasy and fast way for creating thumbnails: $ for fich in *.jpg;do convert "$fich" -resize 32x32 thumb_"$fich";done
-
12.14.08Dealing with imagesIt is usual to think it is not possible to deal with images if we work from the command line. However convert, part of the ImageMagick suite is able to do a great job. Example $ convert file.gif file.jpg Converts from GIF to JPG format.