Megabyte's tkImg build

Megabyte- When I first released Ikonikos Image Manager to everyone on the Wiki, I noticed it had a nasty bug when reading corrupted files (my program would crash), so I filed a bug report. The bug was fixed on the SVN, but for some reason, things were somewhat broken in my Windows and Linux systems. It turned out that my (old) Img library was being loaded first, and the SVN was running fine. Then, I decided I'd be happy with SVN revision 190 of TkImg.

It would be very nice and beautiful, except that... it wouldn't build?

So, after some sweating and dark magic, here is my hacked version of TkImg's SVN build. There are binaries for Linux and Windows alike, and the source trees are also available (Note: install and run this at your own risk).


Why should I get this build instead of version 1.3 or even instead of ActiveTCL's version 1.4 ?

  • This version has many bugfixes, both compared against version 1.3 and 1.4. If it finds a corrupted image it's very likely it won't bring your program down with it, as opposed to versions 1.3 and 1.4.
  • As opposed to version 1.3, this version handles pngs with millions of colors, instead of just limiting them to 256 colors.
  • Support to many image formats compared to version 1.3, including raw file format or even postscript!

I'm eager to download this library. Where do I start?

  • Windows pre-compiled libraries [1 ] - click, click, install. Done.
  • Linux pre-compiled libraries (rpm [4 ], deb [3 ] or tgz [2 ]) - follow the instructions of your package manager. Note: to remove your rpm file, you must do it by the complete file name - just removing using "rpm -e tkimg" will not work.
  • Source tree, Windows [5 ]: download TCL/Tk 8.5's sources. Then run ./configure --prefix=<path to tcl installation> --with-tcl=<path to tcl sources>, make, and make install. Default installation directory is /c/build. If you want to change that, change INSTALL_ROOT_DIR in the main configure file. Copy the files to your TCL installation. It is highly recommended that you use Mingw + MSYS to compile these libraries.
  • Source tree, other operating systems [6 ]: download TCL/Tk 8.5's sources. Then run ./configure, make and make install.

Questions (more will be added if needed)

1. Can I use the Windows source tree to generate the Linux libraries?

  • Probably, but I wouldn't do it. The Windows tree is more hackish, and was modified to ensure everything will build smoothly on Windows. Downloading the Windows source to compile Linux libraries will just make your life more difficult.

2. I found a bug. Where can I report it?

  • Go to TkImg's page [7 ]. Note, however, that this is a modified version of the source tree, so if your bug is specific to the building it might not be covered there.

If you have any questions not covered here, email-me [8 ].


Changelog

01/20/2009

  • Changed Windows build and source tree (both to Windows and other operating systems) to svn 191. The new build tree has a cleaner build.

LV Have the problems been reported to http://sf.net/projects/tkimg ? Have the patches been submitted as well? Perhaps there is a way to get the changed code integrated back into the authority repository.

Megabyte I was lazy to do that, but of course any user is free to create a patch out of the source tree and integrate it back into the repository. As a side note, a critical problem, (two options missing --with-tk and --with-tk-headers (if I remember it right) have been reported, but there still are makefile problems on the Windows build, for instance. I reported them informally on IRC, but not on the bug tracker. That's why I was lazy to re-report them on the tracker.

MJ - Building with MinGW of the latest TkImg HEAD was fine on my machine. Also being lazy like this is penny-wise pound-foolish. The effort to log the bugs and the patches is smaller than repatching TkImg for every new release and keeping patches inline with the changing source.