Changeset 1239
- Timestamp:
- Oct 26, 2006, 11:24:29 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/export.c
r1237 r1239 505 505 unsigned int x, y; 506 506 507 /* 1 6bytes assumed for max length per pixel. Worst case scenario:507 /* 14 bytes assumed for max length per pixel. Worst case scenario: 508 508 * ^Cxx,yy 6 bytes 509 509 * ^B^B 2 bytes 510 510 * ch 6 bytes 511 * 3 bytes for max length per line. Worst case scenario: 512 * <spc> 1 byte (for empty lines) 511 513 * \r\n 2 bytes 512 514 * In real life, the average bytes per pixel value will be around 5. 513 515 */ 514 516 515 ex->size = 2 + (cv->width * cv->height * 16);517 ex->size = 2 + cv->height * (3 + cv->width * 14); 516 518 ex->data = malloc(ex->size); 517 519 … … 583 585 prevbg = bg; 584 586 } 587 588 /* TODO: do the same the day we optimise whole lines above */ 589 if(!cv->width) 590 *cur++ = ' '; 591 585 592 *cur++ = '\r'; 586 593 *cur++ = '\n';
Note: See TracChangeset
for help on using the changeset viewer.