Changeset 67b05ff in mainline for uspace/srv/hid/fb/ppm.c
- Timestamp:
- 2011-08-10T18:34:23Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c6f08726
- Parents:
- 62e29ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/fb/ppm.c
r62e29ae r67b05ff 29 29 #include <sys/types.h> 30 30 #include <errno.h> 31 #include <imgmap.h> 31 32 32 33 #include "ppm.h" … … 94 95 unsigned int coef; 95 96 97 /* 98 * This is temporary hack to draw 99 * image maps within the original code base. 100 * This will be completely rewritten in the 101 * new framebuffer server. 102 */ 103 if (data[0] == 'I') { 104 imgmap_t *img = (imgmap_t *) data; 105 106 if (img->visual != VISUAL_BGR_8_8_8) 107 return EINVAL; 108 109 data = img->data; 110 111 for (sysarg_t y = 0; y < img->height; y++) { 112 for (sysarg_t x = 0; x < img->width; x++) { 113 if ((x > maxwidth) || (y > maxheight)) { 114 data += 3; 115 continue; 116 } 117 118 color = (data[2] << 16) + (data[1] << 8) + data[0]; 119 120 (*putpixel)(vport, sx + x, sy + y, color); 121 data += 3; 122 } 123 } 124 125 return 0; 126 } 127 96 128 /* Read magic */ 97 129 if ((data[0] != 'P') || (data[1] != '6'))
Note:
See TracChangeset
for help on using the changeset viewer.