diff options
Diffstat (limited to 'pnmshow.c')
-rw-r--r-- | pnmshow.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -48,6 +48,9 @@ int main(int argc,char** argv) rfbScreen->rfbAlwaysShared = TRUE; rfbScreen->kbdAddEvent = HandleKey; + /* enable http */ + rfbScreen->httpDir = "./classes"; + /* allocate picture and read it */ rfbScreen->frameBuffer = (char*)malloc(width*height*4); fread(rfbScreen->frameBuffer,width*3,height,in); @@ -55,16 +58,9 @@ int main(int argc,char** argv) /* correct the format to 4 bytes instead of 3 */ for(i=width*height-1;i>=0;i--) { - rfbScreen->frameBuffer[i*4+2]=rfbScreen->frameBuffer[i*3+0]; + rfbScreen->frameBuffer[i*4+2]=rfbScreen->frameBuffer[i*3+2]; rfbScreen->frameBuffer[i*4+1]=rfbScreen->frameBuffer[i*3+1]; - rfbScreen->frameBuffer[i*4+0]=rfbScreen->frameBuffer[i*3+2]; - } - - for(i=0;i<200;i++) { - rfbScreen->frameBuffer[i*4+i*width*4]=0; - rfbScreen->frameBuffer[i*4+i*width*4+1]=0; - rfbScreen->frameBuffer[i*4+i*width*4+2]=0; - rfbScreen->frameBuffer[i*4+i*width*4+3]=0; + rfbScreen->frameBuffer[i*4+0]=rfbScreen->frameBuffer[i*3+0]; } /* run event loop */ |