| 328 | |
| 329 | |
| 330 | ILboolean channelReadPure(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes) |
| 331 | { |
| 332 | ILubyte col[4]; |
| 333 | ILint count; |
| 334 | int i, j, k; |
| 335 | |
| 336 | for (i = width; i > 0; ) { |
| 337 | count = igetc(); |
| 338 | if (count == IL_EOF) |
| 339 | return IL_FALSE; |
| 340 | if (count > width) |
| 341 | count = width; |
| 342 | i -= count; |
| 343 | |
| 344 | if (ieof()) |
| 345 | return IL_FALSE; |
| 346 | |
| 347 | for (j = 0; j < noCol; j++) |
| 348 | if (iread(&col[j], 1, 1) != 1) |
| 349 | return IL_FALSE; |
| 350 | |
| 351 | for (k = 0; k < count; k++, scan += bytes) { |
| 352 | for(j = 0; j < noCol; j++) |
| 353 | scan[off[j] + k] = col[j]; |
| 354 | } |
| 355 | } |
| 356 | return IL_TRUE; |
| 357 | } |
| 358 | |
| 359 | |
| 360 | ILboolean channelReadMixed(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes) |