Changeset 512 for abuse/trunk/src/imlib/pcxread.cpp
- Timestamp:
- Apr 20, 2011, 12:39:27 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/imlib/pcxread.cpp
r494 r512 10 10 11 11 #include "config.h" 12 13 #include "common.h" 12 14 13 15 #include "pcxread.h" … … 60 62 PCX_header.xmin=0; 61 63 PCX_header.ymin=0; 62 PCX_header.xmax=im-> width()-1;63 PCX_header.ymax=im-> height()-1;64 PCX_header.xmax=im->Size().x-1; 65 PCX_header.ymax=im->Size().y-1; 64 66 PCX_header.hres=320; 65 67 PCX_header.vres=200; 66 68 PCX_header.reserved=0; 67 69 PCX_header.color_planes=1; 68 PCX_header.bytes_per_line=im-> width();70 PCX_header.bytes_per_line=im->Size().x; 69 71 PCX_header.palette_type=0; 70 72 memset(PCX_header.filter,0,58); … … 78 80 int y,run_length,x; 79 81 unsigned char *sl,code; 80 for (y=0; y<im-> height(); y++)82 for (y=0; y<im->Size().y; y++) 81 83 { 82 84 sl=im->scan_line(y); 83 for (x=0; x<im-> width(); )85 for (x=0; x<im->Size().x; ) 84 86 { 85 87 run_length=1; 86 while (x+run_length<im-> width()&& sl[x]==sl[x+run_length])88 while (x+run_length<im->Size().x && sl[x]==sl[x+run_length]) 87 89 run_length++; 88 90 if (run_length==1 && sl[x]<64)
Note: See TracChangeset
for help on using the changeset viewer.