• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/tcl-105/tcl_ext/tkimg/tkimg/sgi/

Lines Matching refs:th

1112     IMAGE th;
1147 static void printImgInfo (IMAGE *th, const char *filename, const char *msg)
1157 sprintf(str, "\tSize in pixel : %d x %d\n", th->xsize, th->ysize); OUT;
1158 sprintf(str, "\tNo. of channels : %d\n", (th->zsize)); OUT;
1159 sprintf(str, "\tBytes per pixel : %d\n", BPP(th->type)); OUT;
1160 sprintf(str, "\tCompression : %s\n", ISRLE(th->type)? "RLE": "None"); OUT;
1165 static Boln readHeader (tkimg_MFile *handle, IMAGE *th)
1167 if (512 != tkimg_Read(handle, (char *)th, 512)) {
1170 if( ((th->imagic>>8) | ((th->imagic&0xff)<<8)) == IMAGIC ) {
1171 th->dorev = 1;
1172 cvtimage((int *)th);
1174 th->dorev = 0;
1176 if (th->imagic != IMAGIC) {
1183 static Boln writeHeader(tkimg_MFile *handle, IMAGE *th, UInt type, UInt dim,
1186 if (!imgOpenWrite ((MYCHANNEL)handle->data, th, "w",
1198 if (-1 == getrow (&tf->th, tf->pixbuf, y, sgichn))
1202 switch (BPP(tf->th.type)) {
1226 nchan = tf->th.zsize;
1229 if (!readChannel (tf, tf->scanline, 0, nchan, y, tf->th.xsize)) {
1235 if (!readChannel (tf, tf->scanline, 1, nchan, y, tf->th.xsize) ||
1236 !readChannel (tf, tf->scanline, 2, nchan, y, tf->th.xsize))
1243 y, tf->th.xsize))
1257 if (-1 == putrow (&tf->th, tf->pixbuf, y, sgichn))
1266 if (!writeChannel (tf, tf->redScan, 0, y, tf->th.xsize) ||
1267 !writeChannel (tf, tf->greenScan, 1, y, tf->th.xsize) ||
1268 !writeChannel (tf, tf->blueScan, 2, y, tf->th.xsize))
1271 if (tf->th.zsize > 3)
1272 if (!writeChannel (tf, tf->matteScan, 3, y, tf->th.xsize))
1426 IMAGE th;
1429 if (!readHeader (handle, &th))
1432 if (!imgOpenRead ((MYCHANNEL)handle->data, &th, "r"))
1436 if (th.xsize <= 0 || th.ysize <= 0)
1439 *widthPtr = th.xsize;
1440 *heightPtr = th.ysize;
1442 *sgiHeaderPtr = th;
1554 CommonMatch(handle, &fileWidth, &fileHeight, &tf.th);
1556 printImgInfo (&tf.th, filename, "Reading image:");
1577 nchan = tf.th.zsize;
1756 tf.th.imagic = IMAGIC;
1758 if (!writeHeader(handle, &tf.th,
1763 tf.th.dorev = isIntel();
1789 printImgInfo (&tf.th, filename, "Saving image:");
1791 iclose (&tf.th);