00001 #include "ExCImageLoader.h"
00002
00003
00004 ExCImageLoader::ExCImageLoader(void)
00005 {
00006 }
00007
00008 ExCImageLoader::ExCImageLoader(std::string FileName)
00009 {
00010 LoadImage(FileName);
00011 }
00012
00013 ExCImageLoader::~ExCImageLoader(void)
00014 {
00015 delete m_data;
00016 delete m_palette;
00017 }
00018
00019 TextureType ExCImageLoader::FindTextureType(std::string FileName)
00020 {
00021 Guard(TextureType ExCImageLoader::FindTextureType(std::string FileName))
00022
00023
00024 if(FileName.find("."))
00025 {
00026 if(FileName.find(".bmp")==(FileName.length()-4))return BMP;
00027 if(FileName.find(".tga")==(FileName.length()-4))return TGA;
00028 if(FileName.find(".pcx")==(FileName.length()-4))return PCX;
00029
00030
00031
00032 if(FileName.find(".dds")==(FileName.length()-4))return DDS;
00033 if(FileName.find(".ppm")==(FileName.length()-4))return PPM;
00034 if(FileName.find(".")<FileName.length())return UNKNOWN;
00035 }
00036
00037
00038 FILE *file;
00039 std::ifstream filetest;
00040 std::string strFileName;
00041
00042
00043 strFileName=FileName+".bmp";
00044 if ((file = fopen(strFileName.data(), "r"))!=NULL){fclose(file);return BMP;}
00045
00046 strFileName=FileName+".pcx";
00047 if ((file = fopen(strFileName.data(), "r"))!=NULL){fclose(file);return PCX;}
00048
00049 strFileName=FileName+".tga";
00050 if ((file = fopen(strFileName.data(), "r"))!=NULL){fclose(file);return TGA;}
00051
00052 strFileName=FileName+".ppm";
00053 if ((file = fopen(strFileName.data(), "r"))!=NULL){fclose(file);return PPM;}
00054
00055 strFileName=FileName+".dds";
00056 if ((file = fopen(strFileName.data(), "r"))!=NULL){fclose(file);return DDS;}
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 throw ExCExpFileNotFound();
00069 return UNKNOWN;
00070 UnGuard
00071 }
00072
00073 bool ExCImageLoader::LoadImage(std::string FileName)
00074 {
00075 Guard(bool ExCImageLoader::LoadImage(std::string FileName))
00076 m_TextureType=FindTextureType(FileName);
00077
00078 switch(m_TextureType)
00079 {
00080 case BMP:return LoadBMP(FileName);
00081 case TGA:return LoadTGA(FileName);
00082 case PCX:return LoadPCX(FileName);
00083 case JPG:return LoadJPG(FileName);
00084
00085
00086 case DDS:return LoadDDS(FileName);
00087 case PPM:return LoadPPM(FileName);
00088 case UNKNOWN:return false;
00089 default:return false;
00090 }
00091 UnGuard
00092 }
00093
00094
00095
00096
00097
00098
00099
00100 bool ExCImageLoader::LoadRAW(std::string strFileName)
00101 {
00102 return false;
00103 }
00104
00105 bool ExCImageLoader::LoadRGB(std::string strFileName)
00106 {
00107 return false;
00108 }
00109
00110 bool ExCImageLoader::LoadJPG(std::string strFileName)
00111 {
00112
00113 return false;
00114 }
00115
00116 bool ExCImageLoader::LoadDDS(std::string strFileName)
00117 {
00118 Guard(bool ExCImageLoader::LoadDDS(std::string strFileName))
00119 m_TextureType = DDS;
00120 DDSURFACEDESC2 ddsd;
00121 char filecode[4];
00122 FILE *fp;
00123 int factor;
00124
00125 strFileName=strFileName+".dds";
00126 fp = fopen(strFileName.data(), "rb");
00127 if (!fp)
00128 {
00129 throw ExCExpFileNotFound();
00130 return NULL;
00131 }
00132
00133
00134 fread(filecode, 1, 4, fp);
00135 if (strncmp(filecode, "DDS ", 4) != 0)
00136 {
00137 fclose(fp);
00138 return NULL;
00139 }
00140
00141
00142 fread(&ddsd, sizeof(ddsd), 1, fp);
00143
00144 switch(ddsd.ddpfPixelFormat.dwFourCC)
00145 {
00146 case FOURCC_DXT1:
00147 m_ddsFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
00148 factor = 2;
00149 break;
00150 case FOURCC_DXT3:
00151 m_ddsFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
00152 factor = 4;
00153 break;
00154 case FOURCC_DXT5:
00155 m_ddsFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
00156 factor = 4;
00157 break;
00158 default:
00159 return NULL;
00160 }
00161
00162
00163 m_ddsBufsize = ddsd.dwMipMapCount > 1 ? ddsd.dwLinearSize * factor : ddsd.dwLinearSize;
00164
00165
00166 m_data = (unsigned char*)malloc(m_ddsBufsize * sizeof(unsigned char));
00167
00168 fread(m_data, 1, m_ddsBufsize, fp);
00169
00170 fclose(fp);
00171
00172
00173
00174
00175
00176
00177 m_sizeX = ddsd.dwWidth;
00178 m_sizeY = ddsd.dwHeight;
00179 m_ddsComponent = (ddsd.ddpfPixelFormat.dwFourCC == FOURCC_DXT1) ? 3 : 4;
00180 m_ddsNumMipmaps = ddsd.dwMipMapCount;
00181 return true;
00182 UnGuard
00183 }
00184
00185 bool ExCImageLoader::LoadPPM(std::string strFileName)
00186 {
00187 Guard(bool ExCImageLoader::LoadPPM(std::string strFileName))
00188 FILE* fp;
00189 int i, w, h, d;
00190 char head[70];
00191
00192 strFileName=strFileName+".ppm";
00193
00194 fp = fopen(strFileName.data(), "rb");
00195 if (!fp)
00196 {
00197 std::cout<<strFileName<<std::endl;
00198 throw ExCExpFileNotFound();
00199 return NULL;
00200 }
00201
00202
00203
00204 fgets(head, 70, fp);
00205 if (strncmp(head, "P6", 2))
00206 {
00207 printf("%s: Not a raw PPM file\n", strFileName.data());
00208 return NULL;
00209 }
00210
00211
00212 i = 0;
00213 while(i < 3) {
00214 fgets(head, 70, fp);
00215 if (head[0] == '#')
00216 continue;
00217 if (i == 0)
00218 i += sscanf(head, "%d %d %d", &w, &h, &d);
00219 else if (i == 1)
00220 i += sscanf(head, "%d %d", &h, &d);
00221 else if (i == 2)
00222 i += sscanf(head, "%d", &d);
00223 }
00224
00225
00226 m_data = (unsigned char*)malloc(sizeof(unsigned char)*w*h*3);
00227 fread(m_data, sizeof(unsigned char), w*h*3, fp);
00228 fclose(fp);
00229
00230 m_sizeX = w;
00231 m_sizeY = h;
00232
00233
00234 return true;
00235 UnGuard
00236 }
00237
00238 bool ExCImageLoader::LoadTGA(std::string strFileName)
00239 {
00240 Guard(bool ExCImageLoader::LoadTGA(std::string strFileName))
00241 WORD width = 0, height = 0;
00242 byte length = 0;
00243 byte imageType = 0;
00244 byte bits = 0;
00245 FILE *pFile = NULL;
00246 int channels = 0;
00247 int stride = 0;
00248 int i = 0;
00249
00250 strFileName=strFileName+".tga";
00251
00252 if((pFile = fopen(strFileName.data(), "rb")) == NULL)
00253 {
00254
00255 std::cout<<strFileName<<std::endl;
00256 throw ExCExpFileNotFound();
00257 return NULL;
00258 }
00259
00260
00261 fread(&length, sizeof(byte), 1, pFile);
00262
00263
00264 fseek(pFile,1,SEEK_CUR);
00265
00266
00267 fread(&imageType, sizeof(byte), 1, pFile);
00268
00269
00270 fseek(pFile, 9, SEEK_CUR);
00271
00272
00273 fread(&width, sizeof(WORD), 1, pFile);
00274 fread(&height, sizeof(WORD), 1, pFile);
00275 fread(&bits, sizeof(byte), 1, pFile);
00276
00277
00278 fseek(pFile, length + 1, SEEK_CUR);
00279
00280
00281 if(imageType != TGA_RLE)
00282 {
00283
00284 if(bits == 24 || bits == 32)
00285 {
00286
00287
00288 channels = bits / 8;
00289 stride = channels * width;
00290 m_data = new unsigned char[stride * height];
00291
00292
00293 for(int y = 0; y < height; y++)
00294 {
00295
00296 unsigned char *pLine = &(m_data[stride * y]);
00297
00298
00299 fread(pLine, stride, 1, pFile);
00300
00301
00302
00303 for(i = 0; i < stride; i += channels)
00304 {
00305 int temp = pLine[i];
00306 pLine[i] = pLine[i + 2];
00307 pLine[i + 2] = temp;
00308 }
00309 }
00310 }
00311
00312 else if(bits == 16)
00313 {
00314 unsigned short pixels = 0;
00315 int r=0, g=0, b=0;
00316
00317
00318
00319 channels = 3;
00320 stride = channels * width;
00321 m_data = new unsigned char[stride * height];
00322
00323
00324 for(int i = 0; i < width*height; i++)
00325 {
00326
00327 fread(&pixels, sizeof(unsigned short), 1, pFile);
00328
00329
00330
00331
00332
00333
00334 b = (pixels & 0x1f) << 3;
00335 g = ((pixels >> 5) & 0x1f) << 3;
00336 r = ((pixels >> 10) & 0x1f) << 3;
00337
00338
00339
00340 m_data[i * 3 + 0] = r;
00341 m_data[i * 3 + 1] = g;
00342 m_data[i * 3 + 2] = b;
00343 }
00344 }
00345
00346 else
00347 return NULL;
00348 }
00349
00350 else
00351 {
00352
00353 byte rleID = 0;
00354 int colorsRead = 0;
00355 channels = bits / 8;
00356 stride = channels * width;
00357
00358
00359
00360 m_data = new unsigned char[stride * height];
00361 byte *pColors = new byte [channels];
00362
00363
00364 while(i < width*height)
00365 {
00366
00367 fread(&rleID, sizeof(byte), 1, pFile);
00368
00369
00370 if(rleID < 128)
00371 {
00372
00373 rleID++;
00374
00375
00376 while(rleID)
00377 {
00378
00379 fread(pColors, sizeof(byte) * channels, 1, pFile);
00380
00381
00382 m_data[colorsRead + 0] = pColors[2];
00383 m_data[colorsRead + 1] = pColors[1];
00384 m_data[colorsRead + 2] = pColors[0];
00385
00386
00387 if(bits == 32)
00388 m_data[colorsRead + 3] = pColors[3];
00389
00390
00391
00392 i++;
00393 rleID--;
00394 colorsRead += channels;
00395 }
00396 }
00397
00398 else
00399 {
00400
00401 rleID -= 127;
00402
00403
00404 fread(pColors, sizeof(byte) * channels, 1, pFile);
00405
00406
00407 while(rleID)
00408 {
00409
00410 m_data[colorsRead + 0] = pColors[2];
00411 m_data[colorsRead + 1] = pColors[1];
00412 m_data[colorsRead + 2] = pColors[0];
00413
00414
00415 if(bits == 32)
00416 m_data[colorsRead + 3] = pColors[3];
00417
00418
00419
00420 i++;
00421 rleID--;
00422 colorsRead += channels;
00423 }
00424
00425 }
00426
00427 }
00428 }
00429
00430
00431 fclose(pFile);
00432
00433
00434 m_channels = channels;
00435 m_sizeX = width;
00436 m_sizeY = height;
00437 m_TextureType = TGA;
00438 return true;
00439 UnGuard
00440 }
00441
00442 bool ExCImageLoader::LoadBMP(std::string strFileName)
00443 {
00444 Guard(bool ExCImageLoader::LoadBMP(std::string strFileName))
00445 strFileName=strFileName+".bmp";
00446 return LoadBMP(strFileName.data());
00447 UnGuard
00448 }
00449
00450 bool ExCImageLoader::LoadPCX(std::string strFileName)
00451 {
00452 Guard(bool ExCImageLoader::LoadPCX(std::string strFileName))
00453 PCXHEADER texInfo;
00454
00455 unsigned char *unscaledData;
00456 int i;
00457 int j;
00458 int width;
00459 int height;
00460
00461
00462
00463 m_data=LoadPCXFile(strFileName, &texInfo);
00464 if (m_data == NULL)
00465 {
00466 free(m_data);
00467 throw ExCExpNullPointer();
00468 return false;
00469 }
00470
00471
00472 m_palette = texInfo.palette;
00473 m_sizeX = texInfo.xMax - texInfo.xMin + 1;
00474 m_sizeY = texInfo.yMax - texInfo.yMin + 1;
00475
00476
00477 unscaledData = (unsigned char*)malloc(m_sizeX*m_sizeY*4);
00478
00479
00480 for (j = 0; j < m_sizeY; j++)
00481 {
00482 for (i = 0; i < m_sizeX; i++)
00483 {
00484 unscaledData[4*(j*m_sizeX+i)+0] = (unsigned char)m_palette[3*m_data[j*m_sizeX+i]+0];
00485 unscaledData[4*(j*m_sizeX+i)+1] = (unsigned char)m_palette[3*m_data[j*m_sizeX+i]+1];
00486 unscaledData[4*(j*m_sizeX+i)+2] = (unsigned char)m_palette[3*m_data[j*m_sizeX+i]+2];
00487 unscaledData[4*(j*m_sizeX+i)+3] = (unsigned char)255;
00488 }
00489 }
00490
00491
00492 width = m_sizeX;
00493 height = m_sizeY;
00494
00495
00496 i = 0;
00497 while (width)
00498 {
00499 width /= 2;
00500 i++;
00501 }
00502 m_scaledHeight = (long)pow(2, i-1);
00503
00504
00505 i = 0;
00506 while (height)
00507 {
00508 height /= 2;
00509 i++;
00510 }
00511 m_scaledWidth = (long)pow(2, i-1);
00512
00513
00514 if (m_data != NULL)
00515 {
00516 free(m_data);
00517 m_data = NULL;
00518 }
00519
00520
00521 m_data = (unsigned char*)malloc(m_scaledWidth*m_scaledHeight*4);
00522
00523
00524 gluScaleImage (GL_RGBA, m_sizeX, m_sizeY, GL_UNSIGNED_BYTE, unscaledData, m_scaledWidth, m_scaledHeight, GL_UNSIGNED_BYTE, m_data);
00525
00526 return true;
00527 UnGuard
00528 }
00529
00530 bool ExCImageLoader::LoadBMP(const char *strFileName)
00531 {
00532 Guard(bool ExCImageLoader::LoadBMP(const char *strFileName))
00533
00534 FILE *file;
00535 unsigned long size;
00536 unsigned long i;
00537 unsigned short int planes;
00538 unsigned short int channels;
00539 char temp;
00540
00541
00542 if ((file = fopen(strFileName, "rb"))==NULL)
00543 {
00544 printf("ExCImageLoader::LoadBMP ==>File Not Found : %s\n",strFileName);
00545 throw ExCExpFileNotFound();
00546 return false;
00547 }
00548 #ifdef UNIX_SRC
00549 unsigned short int is_bmp;
00550 if (! fread (&is_bmp, sizeof (short int), 1, file))
00551 {
00552 printf("cannot read %s.\n", strFileName);
00553 return false;
00554 }
00555
00556
00557 if (is_bmp != 19778)
00558 {
00559 printf("%s is not a valid bmp file.\n", strFileName);
00560 return false;
00561 }
00562
00563 fseek (file, 8, SEEK_CUR);
00564
00565 long int bfOffBits;
00566 if (! fread (&bfOffBits, sizeof (long int), 1, file))
00567 {
00568 printf("Error reading %s.\n", strFileName);
00569 return false;
00570 }
00571
00572
00573
00574
00575 fseek(file, 4, SEEK_CUR);
00576 #else
00577 fseek(file, 18, SEEK_SET);
00578 #endif
00579
00580 if ((i = fread(&m_sizeX, 4, 1, file)) != 1)
00581 {
00582 printf("Error reading width from %s.\n", strFileName);
00583 return false;
00584 }
00585
00586
00587 if ((i = fread(&m_sizeY, 4, 1, file)) != 1)
00588 {
00589 printf("Error reading height from %s.\n", strFileName);
00590 return false;
00591 }
00592
00593
00594
00595 size = m_sizeX * m_sizeY * 3;
00596
00597
00598 if ((fread(&planes, 2, 1, file)) != 1)
00599 {
00600 printf("Error reading planes from %s.\n", strFileName);
00601 return false;
00602 }
00603
00604 if (planes != 1)
00605 {
00606 printf("Planes from %s is not 1: %u.\n", strFileName, planes);
00607 return false;
00608 }
00609
00610
00611 if ((i = fread(&channels, 2, 1, file)) != 1)
00612 {
00613 printf("Error reading channels from %s.\n", strFileName);
00614 return false;
00615 }
00616 if (channels != 24)
00617 {
00618 printf("channels from %s is not 24: %u\n", strFileName, channels);
00619 return false;
00620 }
00621
00622
00623 fseek(file, 24, SEEK_CUR);
00624
00625 m_data = new unsigned char[size];
00626
00627
00628
00629 if (m_data == NULL)
00630 {
00631 printf("Error allocating memory for color-corrected image data");
00632 return false;
00633 }
00634
00635 if ((i = fread(m_data, size, 1, file)) != 1)
00636 {
00637 printf("Error reading image data from %s.\n", strFileName);
00638 return false;
00639 }
00640
00641 for (i=0;i<size;i+=3)
00642 {
00643
00644 temp = m_data[i];
00645 m_data[i] = m_data[i+2];
00646 m_data[i+2] = temp;
00647 }
00648
00649 m_type=GL_RGB;
00650 m_channels=3;
00651 fclose(file);
00652 return true;
00653 UnGuard
00654 }
00655
00656 unsigned char * ExCImageLoader::LoadPCXFile(std::string filename, PCXHEADER *pcxHeader)
00657 {
00658 Guard(unsigned char * ExCImageLoader::LoadPCXFile(std::string filename, PCXHEADER *pcxHeader))
00659 int idx = 0;
00660 int c;
00661 int i;
00662 int numRepeat;
00663 FILE *filePtr;
00664 int width;
00665 int height;
00666 unsigned char *pixelData;
00667 unsigned char *paletteData;
00668
00669 filename=filename+".pcx";
00670
00671 filePtr = fopen(filename.data(), "rb");
00672 if (filePtr == NULL)
00673 {
00674 throw ExCExpFileNotFound();
00675 return NULL;
00676 }
00677
00678 c = getc(filePtr);
00679 if (c != 10)
00680 {
00681 fclose(filePtr);
00682 return NULL;
00683 }
00684
00685 c = getc(filePtr);
00686 if (c != 5)
00687 {
00688 fclose(filePtr);
00689 return NULL;
00690 }
00691
00692 rewind(filePtr);
00693
00694
00695 fgetc(filePtr);
00696 fgetc(filePtr);
00697 fgetc(filePtr);
00698 fgetc(filePtr);
00699
00700
00701 pcxHeader->xMin = fgetc(filePtr);
00702 pcxHeader->xMin |= fgetc(filePtr) << 8;
00703
00704
00705 pcxHeader->yMin = fgetc(filePtr);
00706 pcxHeader->yMin |= fgetc(filePtr) << 8;
00707
00708
00709 pcxHeader->xMax = fgetc(filePtr);
00710 pcxHeader->xMax |= fgetc(filePtr) << 8;
00711
00712
00713 pcxHeader->yMax = fgetc(filePtr);
00714 pcxHeader->yMax |= fgetc(filePtr) << 8;
00715
00716
00717 width = pcxHeader->xMax - pcxHeader->xMin + 1;
00718 height = pcxHeader->yMax - pcxHeader->yMin + 1;
00719
00720
00721 pixelData = (unsigned char*)malloc(width*height);
00722
00723
00724 fseek(filePtr, 128, SEEK_SET);
00725
00726
00727 while (idx < (width*height))
00728 {
00729 c = getc(filePtr);
00730 if (c > 0xbf)
00731 {
00732 numRepeat = 0x3f & c;
00733 c = getc(filePtr);
00734
00735 for (i = 0; i < numRepeat; i++)
00736 {
00737 pixelData[idx++] = c;
00738 }
00739 }
00740 else
00741 pixelData[idx++] = c;
00742
00743 fflush(stdout);
00744 }
00745
00746
00747 paletteData = (unsigned char*)malloc(768);
00748
00749
00750 fseek(filePtr, -769, SEEK_END);
00751
00752
00753 c = getc(filePtr);
00754 if (c != 12)
00755 {
00756 fclose(filePtr);
00757 return NULL;
00758 }
00759
00760 for (i = 0; i < 768; i++)
00761 {
00762 c = getc(filePtr);
00763 paletteData[i] = c;
00764 }
00765
00766
00767 fclose(filePtr);
00768 pcxHeader->palette = paletteData;
00769
00770
00771 return pixelData;
00772 UnGuard
00773 }
00774
00775 bool ExCImageLoader::SaveImage(std::string FileName,int width,int height)
00776 {
00777 Guard(bool ExCImageLoader::SaveImage(std::string FileName,int width,int height))
00778 m_TextureType=FindTextureType(FileName);
00779
00780 unsigned char * imageData;
00781 imageData= (unsigned char*) malloc(width*height*3);
00782 memset(imageData,255, width* height* 3);
00783
00784 glReadBuffer(GL_FRONT);
00785 glReadPixels(0, 0, width- 1, height- 1, GL_RGB, GL_UNSIGNED_BYTE, imageData);
00786
00787
00788 switch(m_TextureType)
00789 {
00790 case BMP:return SaveBMP(FileName,width,height,imageData);
00791 case TGA:return SaveTGA(FileName,width,height,imageData);
00792 case PCX:return SavePCX(FileName,width,height,imageData);
00793 case JPG:return SaveJPG(FileName,width,height,imageData);
00794 case RGB:return SaveRGB(FileName,width,height,imageData);
00795 case RAW:return SaveRAW(FileName,width,height,imageData);
00796 case PPM:return SavePPM(FileName,width,height,imageData);
00797 case UNKNOWN:return false;
00798 default:return false;
00799 }
00800 UnGuard
00801 }
00802
00803 bool ExCImageLoader::SaveTGA(std::string strFileName,int width,int height,unsigned char * ImageData)
00804 {
00805 Guard(bool ExCImageLoader::SaveTGA(std::string strFileName,int width,int height,unsigned char * ImageData))
00806 FILE *pFile;
00807 unsigned char uselessChar=0;
00808 short int uselessInt=0;
00809 unsigned char imageType=2;
00810 int index=0;
00811 unsigned char bits=24;
00812 int colorMode=3;
00813 long Size=width * height * colorMode;
00814
00815 if(pFile= fopen(strFileName.data(), "wb"))
00816 {
00817 fwrite(&uselessChar, sizeof(unsigned char), 1, pFile);
00818 fwrite(&uselessChar, sizeof(unsigned char), 1, pFile);
00819 fwrite(&imageType, sizeof(unsigned char), 1, pFile);
00820 fwrite(&uselessInt, sizeof(short int), 1, pFile);
00821 fwrite(&uselessInt, sizeof(short int), 1, pFile);
00822 fwrite(&uselessChar, sizeof(unsigned char), 1, pFile);
00823 fwrite(&uselessInt, sizeof(short int), 1, pFile);
00824 fwrite(&uselessInt, sizeof(short int), 1, pFile);
00825 fwrite(&width, sizeof(short int), 1, pFile);
00826 fwrite(&height, sizeof(short int), 1, pFile);
00827 fwrite(&bits, sizeof(unsigned char), 1, pFile);
00828 fwrite(&uselessChar, sizeof(unsigned char), 1, pFile);
00829 for(index = 0; index < Size; index += colorMode)
00830 ImageData[index]^= ImageData[index + 2]^=ImageData[index]^=ImageData[index + 2];
00831 fwrite(ImageData, sizeof(unsigned char), Size, pFile);
00832 fclose(pFile);
00833 return true;
00834 }
00835 fclose(pFile);
00836 return false;
00837 UnGuard
00838 }
00839
00840 bool ExCImageLoader::SaveBMP(std::string strFileName,int width,int height,unsigned char * ImageData)
00841 {
00842 Guard(bool ExCImageLoader::SaveBMP(std::string strFileName,int width,int height,unsigned char * ImageData))
00843 return false;
00844 UnGuard
00845 }
00846 bool ExCImageLoader::SavePCX(std::string strFileName,int width,int height,unsigned char * ImageData)
00847 {
00848 Guard(bool ExCImageLoader::SavePCX(std::string strFileName,int width,int height,unsigned char * ImageData))
00849 return false;
00850 UnGuard
00851 }
00852
00853 bool ExCImageLoader::SaveJPG(std::string strFileName,int width,int height,unsigned char * ImageData)
00854 {
00855 Guard(bool ExCImageLoader::SaveJPG(std::string strFileName,int width,int height,unsigned char * ImageData))
00856 return false;
00857 UnGuard
00858 }
00859
00860 bool ExCImageLoader::SaveRGB(std::string strFileName,int width,int height,unsigned char * ImageData)
00861 {
00862 Guard(bool ExCImageLoader::SaveRGB(std::string strFileName,int width,int height,unsigned char * ImageData))
00863 return false;
00864 UnGuard
00865 }
00866
00867 bool ExCImageLoader::SaveRAW(std::string strFileName,int width,int height,unsigned char * ImageData)
00868 {
00869 Guard(bool ExCImageLoader::SaveRAW(std::string strFileName,int width,int height,unsigned char * ImageData))
00870 return false;
00871 UnGuard
00872 }
00873
00874 bool ExCImageLoader::SavePPM(std::string strFileName,int width,int height,unsigned char * ImageData)
00875 {
00876 Guard(bool ExCImageLoader::SavePPM(std::string strFileName,int width,int height,unsigned char * ImageData))
00877 return false;
00878 UnGuard
00879 }