Tk Library command to set the data of a photo image type:
Source data without alpha channelHaO 2014-06-30 What I did not find in 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 (tkImgPhoto.c from Tk8.5) :
======C
if (alphaOffset == 0) { /*
*/
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): ======C Tk_PhotoImageBlock sImageBlock; sImageBlock.pixelPtr = hSymbol->bitmap; 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; }