Tag Archives: picture

iimage: Index your images

A long time ago we looked at album, which ran down a directory of images and created a clickable album as an HTML page. Here’s one that does much the same thing: iimage.

2014-11-06-2sjx281-iimage-01 2014-11-06-2sjx281-iimage-02

iimage is just a bash script that relies on imagemagick‘s convert to create thumbnails, and adds the remaining touches to a folder called .tmp. It does not alter or move your original files, but all my attempts (and the instructions) suggest you have to call the script from the folder where your images lie. Let me know if you find a way around that.

iimage’s output page is very clean and modest, so if you’re looking for something a little more outlandish, you might have some HTML editing in your future. iimage is nothing if not exceptionally neat, with all its product files arranged and ordered. I like that a lot.

Judging by the help flags, iimage can recurse through folders, but I didn’t try that, so I don’t know if recursed directories produce linked pages in the final product. iimage can also update files it has created previously, so you should be able to simply add or remove images to the folder, and generate fresh files without rebuilding everything from scratch.

iimage also will apparently generate an AUTORUN.INF file, which I believe would trigger a full desktop environment to open the index, if you were to burn all of this to a CD and spin it up. I might be wrong on that, but it’s an excellent addition if it’s true.

I see that the date on the most recent version is 2009, but I had no problems aside from dropping the script into the right folder to get everything built. I don’t expect there will be many inconsistencies or technical issues, at least until imagemagick or one of the underlying programs shifts gears.

iimage is apparently not in either Arch/AUR or Debian, which is a shame. But perhaps you can say you got something new from K.Mandla today. … 😉

img2xterm: Dot by dot, block by block

For img2xterm, the idea is to translate from conventional images to block characters visible in a terminal emulator. I say that up front because if you try this in a virtual console, I’m fairly certain you won’t get quite the same results.


To be fair, usually when I say, “You can’t do this in a virtual console,” I go straightaway and try it, to make sure I’m not being stupid. This time it honestly did work, but the results were rather … alarming. The image was there, but Smiley looked a little sinister. 😯

Be that as it may, what’s happening is a translation from pixel to block character, staying faithful to the color, shade and even a certain degree of visual accuracy. It’s rather impressive, when you think about it: img2xterm take make a picture on your screen pixel by pixel, and convert it into block character sequences that your terminal understands.

A couple of caveats though: Note that I said “pixel by pixel.” That means exactly that: It’s a one-to-one representation of the image you feed it. img2xterm — as far as I can tell — doesn’t resize images to fit your terminal, it only translates between the two “modes.” That means if you feed it a 1600×1200 image, it will faithfully trudge through 1,920,000 pixels, dumping its best efforts to your terminal, scrolling and scrolling and scrolling until it finishes the entire field.

So … you’ll probably want to resize your image first. 😉 What you see above was shrunk for a 114×46 terminal, and probably could have been shaved down a little more.

Second, the output is terminal escape sequences, which you can see if you dump img2xterm to a file and open it in a text editor, or if you use the img2cow utility. So while things like caca or aalib are converting to text and shade or color, img2xterm is using block characters to “render” the results. It can look a little different.

All that aside, this is a nifty tool for making custom logins, converting small-scale icons or images into text-based artwork, or … or you decide. I am sure you can think of one or two things to do with this. 😀

libjpeg-progs: A quick flashback to the L’s

I promised a week or two ago that I had two leftover programs in the L section that I couldn’t investigate, because of technical issues at the time.

Here’s one of those two: libjpeg-progs. And while this isn’t really a singular program to itself, it does include a lot of goodies. Including:

  • cjpeg, to compress another format into jpg,
  • djpeg, to reverse that operation,
  • rdjpgcom and wrjpgcom, for reading and writing jpg comments,

and some other tools aimed at exif data.


Nothing flashy to show at the terminal, that’s for sure. The others are no more chatty either.

I’m using the name libjpeg-progs as the title here because that’s where they’re found in Debian; in Arch it looks like libjpeg-turbo, although I’m not sure offhand what the distinction is.

One more for the L section, just to be fair. Then more M programs. …

gifsicle: Cool stuff I can’t show

gifsicle is that fun toy that everybody has, but nobody thinks to use. gifsicle slices and dices gifs. It boils them, mashes them, sticks them in a stew. If gifsicle were a hammer, every gif would look like a nail.

The sad part is, there’s not much for me to show. I can try:


But the things gifsicle does don’t really show up outside a graphical environment. I don’t believe fbi (of fbida) will show gif animation, so most of the things I would show would be static.

No matter. You can trust me. I’m on the Internet. 🙄

gifsicle can explode gifs into individual frames. It can rename those as you like. It can rotate, flip, crop, expand, add transparency, subtract transparency, insert frames, delete frames, add frames, add color, optimize, unoptimize, name frames and add comments. You name it, it does it.

And unfortunately, most of that I can’t really show.

So you’ll have to try it yourself. And remember gifsicle next time you go dashing off to some random Internet site, to break apart the frames of a gif of a cat playing a piano. 😕

album: Pictures in a show

Into the gray area again, where the application of the day is … maybe … not really an application … so much as a script that does something smart, and you have the results to enjoy.

I’ve run into things like this more than once — boxinfo.pl was a good example, or maybe NoPriv.py.

This is album. At this point you can probably guess what it does.


Yep, makes a navigable photo album for you from the contents of a directory.

While it works, there’s little that you need to do other than some simple one-time setup. There’s little to see too. When it’s done, you open the index.html file in your browser, and scope the contents.


Of course, in a text-only environment, you might need to whack at the results a little to actually view your photos. I think this is where I would suggest wiring elinks’s file type preferences to fbv or another framebuffer image viewer.

Or you could just bite the bullet and open it in a graphical environment. Voila.


There are a boatload of options available with album — everything from themes to thumbnail size to page dimensions can be adjusted from the command line.

Like I said, it’s not really an application, but I am sure for some people this will be a fantastic asset — particularly if you have images to display on a web page. 😯

Ah, now the beauty of it becomes obvious, no … ? 🙂