Tk Library command to set the data of a photo image type: [http://www.tcl.tk/man/tcl8.6/TkLib/FindPhoto.htm%|%Man Page Tk8.6%|%] <> Source data without alpha channel [HaO] 2014-06-30 What I did not found out by the man page is how to copy source data which does not have any alpha channel. By inspection of some examples and the Tk source code: ====== if (alphaOffset == 0) { /* * This is the non-alpha case, so can still be fairly * fast. Note that in the non-alpha-source case, the * compositing rule doesn't apply. */ ====== I suppose, that setting the pixel size to 3 and the alpha offset to 0 implicitly says "no alpha". So, a program example with source data rgbrgbrgb (from zint_tcl): ====== Tk_PhotoImageBlock sImageBlock; sImageBlock.width = hSymbol->bitmap_width; sImageBlock.height = hSymbol->bitmap_height; sImageBlock.pitch = 3*hSymbol->bitmap_width; sImageBlock.pixelSize = 3; sImageBlock.offset[0] = 0; sImageBlock.offset[1] = 1; sImageBlock.offset[2] = 2; sImageBlock.offset[3] = 0; if (TCL_OK != Tk_PhotoPutBlock(interp, hPhoto, &sImageBlock, destX0, destY0, destWidth, destHeight, TK_PHOTO_COMPOSITE_OVERLAY)) { fError = 1; } ====== <> <>Enter Category Here