Here is a quick and dirty alpha blending code, for achieving a fade in/out transition between two images. It is coded is C, with critcl for speed, but the algorithm is very simple, a mixing of the pixels from two images returning in a third. package require Img package require critcl package provide alphablend 1.0 critcl::config outdir . critcl::cheaders -I/usr/local/include critcl::ccode { #include #include } ::critcl::ccommand blend_img { dummy ip objc objv } { Tk_PhotoHandle ph[3]; Tk_PhotoImageBlock ib[3]; Tcl_Obj *obj; int i,j,k,blend,pxsiz,pitch; unsigned char *p[3]; if (objc != 5) { Tcl_WrongNumArgs(ip,1,objv,"img1 img2 img3 blend"); return TCL_ERROR; } ph[0] = Tk_FindPhoto(ip,Tcl_GetString(objv[1])); ph[1] = Tk_FindPhoto(ip,Tcl_GetString(objv[2])); ph[2] = Tk_FindPhoto(ip,Tcl_GetString(objv[3])); Tcl_GetIntFromObj(ip,objv[4],&blend); Tk_PhotoGetImage(ph[0],ib); Tk_PhotoGetImage(ph[1],ib+1); Tk_PhotoGetImage(ph[2],ib+2); p[0] = ib[0].pixelPtr; p[1] = ib[1].pixelPtr; p[2] = ib[2].pixelPtr; pxsiz = ib[0].pixelSize; pitch = ib[0].pitch; for (i=0;i