diff options
Diffstat (limited to 'linden/indra/llimage')
-rw-r--r-- | linden/indra/llimage/CMakeLists.txt | 50 | ||||
-rw-r--r-- | linden/indra/llimage/files.lst | 9 | ||||
-rw-r--r-- | linden/indra/llimage/llimage.cpp | 60 | ||||
-rw-r--r-- | linden/indra/llimage/llimage.h | 22 | ||||
-rw-r--r-- | linden/indra/llimage/llimage.vcproj | 229 | ||||
-rw-r--r-- | linden/indra/llimage/llimage_vc8.vcproj | 325 | ||||
-rw-r--r-- | linden/indra/llimage/llimage_vc9.vcproj | 326 | ||||
-rw-r--r-- | linden/indra/llimage/llimagebmp.cpp | 8 | ||||
-rw-r--r-- | linden/indra/llimage/llimagebmp.h | 1 | ||||
-rw-r--r-- | linden/indra/llimage/llimagedxt.h | 1 | ||||
-rw-r--r-- | linden/indra/llimage/llimagej2c.cpp | 6 | ||||
-rw-r--r-- | linden/indra/llimage/llimagej2c.h | 3 | ||||
-rw-r--r-- | linden/indra/llimage/llimagejpeg.cpp | 35 | ||||
-rw-r--r-- | linden/indra/llimage/llimagejpeg.h | 9 | ||||
-rw-r--r-- | linden/indra/llimage/llimagepng.h | 7 | ||||
-rw-r--r-- | linden/indra/llimage/llimagetga.cpp | 37 | ||||
-rw-r--r-- | linden/indra/llimage/llimagetga.h | 5 | ||||
-rw-r--r-- | linden/indra/llimage/llpngwrapper.cpp | 11 | ||||
-rw-r--r-- | linden/indra/llimage/llpngwrapper.h | 6 |
19 files changed, 181 insertions, 969 deletions
diff --git a/linden/indra/llimage/CMakeLists.txt b/linden/indra/llimage/CMakeLists.txt new file mode 100644 index 0000000..5593b4a --- /dev/null +++ b/linden/indra/llimage/CMakeLists.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | project(llimage) | ||
4 | |||
5 | include(00-Common) | ||
6 | include(LLCommon) | ||
7 | include(LLImage) | ||
8 | include(LLMath) | ||
9 | include(LLVFS) | ||
10 | |||
11 | include_directories( | ||
12 | ${LLCOMMON_INCLUDE_DIRS} | ||
13 | ${LLMATH_INCLUDE_DIRS} | ||
14 | ${LLVFS_INCLUDE_DIRS} | ||
15 | ${PNG_INCLUDE_DIRS} | ||
16 | ) | ||
17 | |||
18 | set(llimage_SOURCE_FILES | ||
19 | llimagebmp.cpp | ||
20 | llimage.cpp | ||
21 | llimagedxt.cpp | ||
22 | llimagej2c.cpp | ||
23 | llimagejpeg.cpp | ||
24 | llimagepng.cpp | ||
25 | llimagetga.cpp | ||
26 | llimageworker.cpp | ||
27 | llpngwrapper.cpp | ||
28 | ) | ||
29 | |||
30 | set(llimage_HEADER_FILES | ||
31 | CMakeLists.txt | ||
32 | |||
33 | llimage.h | ||
34 | llimagebmp.h | ||
35 | llimagedxt.h | ||
36 | llimagej2c.h | ||
37 | llimagejpeg.h | ||
38 | llimagepng.h | ||
39 | llimagetga.h | ||
40 | llimageworker.h | ||
41 | llmapimagetype.h | ||
42 | llpngwrapper.h | ||
43 | ) | ||
44 | |||
45 | set_source_files_properties(${llimage_HEADER_FILES} | ||
46 | PROPERTIES HEADER_FILE_ONLY TRUE) | ||
47 | |||
48 | list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES}) | ||
49 | |||
50 | add_library (llimage ${llimage_SOURCE_FILES}) | ||
diff --git a/linden/indra/llimage/files.lst b/linden/indra/llimage/files.lst deleted file mode 100644 index a6ac342..0000000 --- a/linden/indra/llimage/files.lst +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | llimage/llimagebmp.cpp | ||
2 | llimage/llimage.cpp | ||
3 | llimage/llimagedxt.cpp | ||
4 | llimage/llimagej2c.cpp | ||
5 | llimage/llimagejpeg.cpp | ||
6 | llimage/llimagepng.cpp | ||
7 | llimage/llimagetga.cpp | ||
8 | llimage/llimageworker.cpp | ||
9 | llimage/llpngwrapper.cpp | ||
diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp index 52a210f..814e82f 100644 --- a/linden/indra/llimage/llimage.cpp +++ b/linden/indra/llimage/llimage.cpp | |||
@@ -40,9 +40,7 @@ | |||
40 | #include "llimagebmp.h" | 40 | #include "llimagebmp.h" |
41 | #include "llimagetga.h" | 41 | #include "llimagetga.h" |
42 | #include "llimagej2c.h" | 42 | #include "llimagej2c.h" |
43 | #if JPEG_SUPPORT | ||
44 | #include "llimagejpeg.h" | 43 | #include "llimagejpeg.h" |
45 | #endif | ||
46 | #include "llimagepng.h" | 44 | #include "llimagepng.h" |
47 | #include "llimagedxt.h" | 45 | #include "llimagedxt.h" |
48 | 46 | ||
@@ -97,15 +95,15 @@ void LLImageBase::sanityCheck() | |||
97 | } | 95 | } |
98 | } | 96 | } |
99 | 97 | ||
100 | LLString LLImageBase::sLastErrorMessage; | 98 | std::string LLImageBase::sLastErrorMessage; |
101 | BOOL LLImageBase::sSizeOverride = FALSE; | 99 | BOOL LLImageBase::sSizeOverride = FALSE; |
102 | 100 | ||
103 | BOOL LLImageBase::setLastError(const LLString& message, const LLString& filename) | 101 | BOOL LLImageBase::setLastError(const std::string& message, const std::string& filename) |
104 | { | 102 | { |
105 | sLastErrorMessage = message; | 103 | sLastErrorMessage = message; |
106 | if (filename != "") | 104 | if (!filename.empty()) |
107 | { | 105 | { |
108 | sLastErrorMessage += LLString(" FILE:"); | 106 | sLastErrorMessage += " FILE:"; |
109 | sLastErrorMessage += filename; | 107 | sLastErrorMessage += filename; |
110 | } | 108 | } |
111 | llwarns << sLastErrorMessage << llendl; | 109 | llwarns << sLastErrorMessage << llendl; |
@@ -251,7 +249,7 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components) | |||
251 | ++sRawImageCount; | 249 | ++sRawImageCount; |
252 | } | 250 | } |
253 | 251 | ||
254 | LLImageRaw::LLImageRaw(const LLString &filename, bool j2c_lowest_mip_only) | 252 | LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only) |
255 | : LLImageBase() | 253 | : LLImageBase() |
256 | { | 254 | { |
257 | createFromFile(filename, j2c_lowest_mip_only); | 255 | createFromFile(filename, j2c_lowest_mip_only); |
@@ -1112,25 +1110,25 @@ file_extensions[] = | |||
1112 | }; | 1110 | }; |
1113 | #define NUM_FILE_EXTENSIONS sizeof(file_extensions)/sizeof(file_extensions[0]) | 1111 | #define NUM_FILE_EXTENSIONS sizeof(file_extensions)/sizeof(file_extensions[0]) |
1114 | 1112 | ||
1115 | static LLString find_file(LLString &name, S8 *codec) | 1113 | static std::string find_file(std::string &name, S8 *codec) |
1116 | { | 1114 | { |
1117 | LLString tname; | 1115 | std::string tname; |
1118 | for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++) | 1116 | for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++) |
1119 | { | 1117 | { |
1120 | tname = name + "." + LLString(file_extensions[i].exten); | 1118 | tname = name + "." + std::string(file_extensions[i].exten); |
1121 | llifstream ifs(tname.c_str(), llifstream::binary); | 1119 | llifstream ifs(tname, llifstream::binary); |
1122 | if (ifs.is_open()) | 1120 | if (ifs.is_open()) |
1123 | { | 1121 | { |
1124 | ifs.close(); | 1122 | ifs.close(); |
1125 | if (codec) | 1123 | if (codec) |
1126 | *codec = file_extensions[i].codec; | 1124 | *codec = file_extensions[i].codec; |
1127 | return LLString(file_extensions[i].exten); | 1125 | return std::string(file_extensions[i].exten); |
1128 | } | 1126 | } |
1129 | } | 1127 | } |
1130 | return LLString(""); | 1128 | return std::string(""); |
1131 | } | 1129 | } |
1132 | 1130 | ||
1133 | EImageCodec LLImageBase::getCodecFromExtension(const LLString& exten) | 1131 | EImageCodec LLImageBase::getCodecFromExtension(const std::string& exten) |
1134 | { | 1132 | { |
1135 | for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++) | 1133 | for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++) |
1136 | { | 1134 | { |
@@ -1140,19 +1138,19 @@ EImageCodec LLImageBase::getCodecFromExtension(const LLString& exten) | |||
1140 | return IMG_CODEC_INVALID; | 1138 | return IMG_CODEC_INVALID; |
1141 | } | 1139 | } |
1142 | 1140 | ||
1143 | bool LLImageRaw::createFromFile(const LLString &filename, bool j2c_lowest_mip_only) | 1141 | bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip_only) |
1144 | { | 1142 | { |
1145 | LLString name = filename; | 1143 | std::string name = filename; |
1146 | size_t dotidx = name.rfind('.'); | 1144 | size_t dotidx = name.rfind('.'); |
1147 | S8 codec = IMG_CODEC_INVALID; | 1145 | S8 codec = IMG_CODEC_INVALID; |
1148 | LLString exten; | 1146 | std::string exten; |
1149 | 1147 | ||
1150 | deleteData(); // delete any existing data | 1148 | deleteData(); // delete any existing data |
1151 | 1149 | ||
1152 | if (dotidx != LLString::npos) | 1150 | if (dotidx != std::string::npos) |
1153 | { | 1151 | { |
1154 | exten = name.substr(dotidx+1); | 1152 | exten = name.substr(dotidx+1); |
1155 | LLString::toLower(exten); | 1153 | LLStringUtil::toLower(exten); |
1156 | codec = getCodecFromExtension(exten); | 1154 | codec = getCodecFromExtension(exten); |
1157 | } | 1155 | } |
1158 | else | 1156 | else |
@@ -1165,7 +1163,7 @@ bool LLImageRaw::createFromFile(const LLString &filename, bool j2c_lowest_mip_on | |||
1165 | return false; // format not recognized | 1163 | return false; // format not recognized |
1166 | } | 1164 | } |
1167 | 1165 | ||
1168 | llifstream ifs(name.c_str(), llifstream::binary); | 1166 | llifstream ifs(name, llifstream::binary); |
1169 | if (!ifs.is_open()) | 1167 | if (!ifs.is_open()) |
1170 | { | 1168 | { |
1171 | // SJB: changed from llinfos to lldebugs to reduce spam | 1169 | // SJB: changed from llinfos to lldebugs to reduce spam |
@@ -1197,11 +1195,9 @@ bool LLImageRaw::createFromFile(const LLString &filename, bool j2c_lowest_mip_on | |||
1197 | case IMG_CODEC_TGA: | 1195 | case IMG_CODEC_TGA: |
1198 | image = new LLImageTGA(); | 1196 | image = new LLImageTGA(); |
1199 | break; | 1197 | break; |
1200 | #if JPEG_SUPPORT | ||
1201 | case IMG_CODEC_JPEG: | 1198 | case IMG_CODEC_JPEG: |
1202 | image = new LLImageJPEG(); | 1199 | image = new LLImageJPEG(); |
1203 | break; | 1200 | break; |
1204 | #endif | ||
1205 | case IMG_CODEC_J2C: | 1201 | case IMG_CODEC_J2C: |
1206 | image = new LLImageJ2C(); | 1202 | image = new LLImageJ2C(); |
1207 | break; | 1203 | break; |
@@ -1285,20 +1281,18 @@ LLImageFormatted* LLImageFormatted::createFromType(S8 codec) | |||
1285 | case IMG_CODEC_TGA: | 1281 | case IMG_CODEC_TGA: |
1286 | image = new LLImageTGA(); | 1282 | image = new LLImageTGA(); |
1287 | break; | 1283 | break; |
1288 | #if JPEG_SUPPORT | ||
1289 | case IMG_CODEC_JPEG: | 1284 | case IMG_CODEC_JPEG: |
1290 | image = new LLImageJPEG(); | 1285 | image = new LLImageJPEG(); |
1291 | break; | 1286 | break; |
1292 | #endif | 1287 | case IMG_CODEC_PNG: |
1288 | image = new LLImagePNG(); | ||
1289 | break; | ||
1293 | case IMG_CODEC_J2C: | 1290 | case IMG_CODEC_J2C: |
1294 | image = new LLImageJ2C(); | 1291 | image = new LLImageJ2C(); |
1295 | break; | 1292 | break; |
1296 | case IMG_CODEC_DXT: | 1293 | case IMG_CODEC_DXT: |
1297 | image = new LLImageDXT(); | 1294 | image = new LLImageDXT(); |
1298 | break; | 1295 | break; |
1299 | case IMG_CODEC_PNG: | ||
1300 | image = new LLImagePNG(); | ||
1301 | break; | ||
1302 | default: | 1296 | default: |
1303 | image = NULL; | 1297 | image = NULL; |
1304 | break; | 1298 | break; |
@@ -1307,11 +1301,11 @@ LLImageFormatted* LLImageFormatted::createFromType(S8 codec) | |||
1307 | } | 1301 | } |
1308 | 1302 | ||
1309 | // static | 1303 | // static |
1310 | LLImageFormatted* LLImageFormatted::createFromExtension(const LLString& instring) | 1304 | LLImageFormatted* LLImageFormatted::createFromExtension(const std::string& instring) |
1311 | { | 1305 | { |
1312 | LLString exten; | 1306 | std::string exten; |
1313 | size_t dotidx = instring.rfind('.'); | 1307 | size_t dotidx = instring.rfind('.'); |
1314 | if (dotidx != LLString::npos) | 1308 | if (dotidx != std::string::npos) |
1315 | { | 1309 | { |
1316 | exten = instring.substr(dotidx+1); | 1310 | exten = instring.substr(dotidx+1); |
1317 | } | 1311 | } |
@@ -1468,7 +1462,7 @@ void LLImageFormatted::appendData(U8 *data, S32 size) | |||
1468 | 1462 | ||
1469 | //---------------------------------------------------------------------------- | 1463 | //---------------------------------------------------------------------------- |
1470 | 1464 | ||
1471 | BOOL LLImageFormatted::load(const LLString &filename) | 1465 | BOOL LLImageFormatted::load(const std::string &filename) |
1472 | { | 1466 | { |
1473 | resetLastError(); | 1467 | resetLastError(); |
1474 | 1468 | ||
@@ -1505,14 +1499,14 @@ BOOL LLImageFormatted::load(const LLString &filename) | |||
1505 | return res; | 1499 | return res; |
1506 | } | 1500 | } |
1507 | 1501 | ||
1508 | BOOL LLImageFormatted::save(const LLString &filename) | 1502 | BOOL LLImageFormatted::save(const std::string &filename) |
1509 | { | 1503 | { |
1510 | resetLastError(); | 1504 | resetLastError(); |
1511 | 1505 | ||
1512 | apr_file_t* apr_file = ll_apr_file_open(filename, LL_APR_WB); | 1506 | apr_file_t* apr_file = ll_apr_file_open(filename, LL_APR_WB); |
1513 | if (!apr_file) | 1507 | if (!apr_file) |
1514 | { | 1508 | { |
1515 | setLastError("Unable to open file for reading", filename); | 1509 | setLastError("Unable to open file for writing", filename); |
1516 | return FALSE; | 1510 | return FALSE; |
1517 | } | 1511 | } |
1518 | 1512 | ||
diff --git a/linden/indra/llimage/llimage.h b/linden/indra/llimage/llimage.h index 0d97595..98a98c2 100644 --- a/linden/indra/llimage/llimage.h +++ b/linden/indra/llimage/llimage.h | |||
@@ -113,9 +113,9 @@ protected: | |||
113 | void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; }; | 113 | void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; }; |
114 | 114 | ||
115 | public: | 115 | public: |
116 | static const LLString& getLastError() {return sLastErrorMessage;}; | 116 | static const std::string& getLastError() {return sLastErrorMessage;}; |
117 | static void resetLastError() {sLastErrorMessage = LLString("No Error"); }; | 117 | static void resetLastError() {sLastErrorMessage = "No Error"; }; |
118 | static BOOL setLastError(const LLString& message, const LLString& filename = LLString()); // returns FALSE | 118 | static BOOL setLastError(const std::string& message, const std::string& filename = std::string()); // returns FALSE |
119 | 119 | ||
120 | static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels); | 120 | static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels); |
121 | 121 | ||
@@ -125,7 +125,7 @@ public: | |||
125 | 125 | ||
126 | static void setSizeOverride(BOOL enabled) { sSizeOverride = enabled; } | 126 | static void setSizeOverride(BOOL enabled) { sSizeOverride = enabled; } |
127 | 127 | ||
128 | static EImageCodec getCodecFromExtension(const LLString& exten); | 128 | static EImageCodec getCodecFromExtension(const std::string& exten); |
129 | 129 | ||
130 | private: | 130 | private: |
131 | U8 *mData; | 131 | U8 *mData; |
@@ -141,7 +141,7 @@ private: | |||
141 | public: | 141 | public: |
142 | S16 mMemType; // debug | 142 | S16 mMemType; // debug |
143 | 143 | ||
144 | static LLString sLastErrorMessage; | 144 | static std::string sLastErrorMessage; |
145 | 145 | ||
146 | static BOOL sSizeOverride; | 146 | static BOOL sSizeOverride; |
147 | }; | 147 | }; |
@@ -157,7 +157,7 @@ public: | |||
157 | LLImageRaw(U16 width, U16 height, S8 components); | 157 | LLImageRaw(U16 width, U16 height, S8 components); |
158 | LLImageRaw(U8 *data, U16 width, U16 height, S8 components); | 158 | LLImageRaw(U8 *data, U16 width, U16 height, S8 components); |
159 | // Construct using createFromFile (used by tools) | 159 | // Construct using createFromFile (used by tools) |
160 | LLImageRaw(const LLString& filename, bool j2c_lowest_mip_only = false); | 160 | LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only = false); |
161 | 161 | ||
162 | /*virtual*/ void deleteData(); | 162 | /*virtual*/ void deleteData(); |
163 | /*virtual*/ U8* allocateData(S32 size = -1); | 163 | /*virtual*/ U8* allocateData(S32 size = -1); |
@@ -218,7 +218,7 @@ public: | |||
218 | 218 | ||
219 | protected: | 219 | protected: |
220 | // Create an image from a local file (generally used in tools) | 220 | // Create an image from a local file (generally used in tools) |
221 | bool createFromFile(const LLString& filename, bool j2c_lowest_mip_only = false); | 221 | bool createFromFile(const std::string& filename, bool j2c_lowest_mip_only = false); |
222 | 222 | ||
223 | void copyLineScaled( U8* in, U8* out, S32 in_pixel_len, S32 out_pixel_len, S32 in_pixel_step, S32 out_pixel_step ); | 223 | void copyLineScaled( U8* in, U8* out, S32 in_pixel_len, S32 out_pixel_len, S32 in_pixel_step, S32 out_pixel_step ); |
224 | void compositeRowScaled4onto3( U8* in, U8* out, S32 in_pixel_len, S32 out_pixel_len ); | 224 | void compositeRowScaled4onto3( U8* in, U8* out, S32 in_pixel_len, S32 out_pixel_len ); |
@@ -236,7 +236,7 @@ class LLImageFormatted : public LLImageBase | |||
236 | { | 236 | { |
237 | public: | 237 | public: |
238 | static LLImageFormatted* createFromType(S8 codec); | 238 | static LLImageFormatted* createFromType(S8 codec); |
239 | static LLImageFormatted* createFromExtension(const LLString& instring); | 239 | static LLImageFormatted* createFromExtension(const std::string& instring); |
240 | 240 | ||
241 | protected: | 241 | protected: |
242 | /*virtual*/ ~LLImageFormatted(); | 242 | /*virtual*/ ~LLImageFormatted(); |
@@ -255,6 +255,8 @@ public: | |||
255 | 255 | ||
256 | // New methods | 256 | // New methods |
257 | public: | 257 | public: |
258 | // subclasses must return a prefered file extension (lowercase without a leading dot) | ||
259 | virtual std::string getExtension() = 0; | ||
258 | // calcHeaderSize() returns the maximum size of header; | 260 | // calcHeaderSize() returns the maximum size of header; |
259 | // 0 indicates we don't know have a header and have to lead the entire file | 261 | // 0 indicates we don't know have a header and have to lead the entire file |
260 | virtual S32 calcHeaderSize() { return 0; }; | 262 | virtual S32 calcHeaderSize() { return 0; }; |
@@ -265,8 +267,8 @@ public: | |||
265 | // getRawDiscardLevel()by default returns mDiscardLevel, but may be overridden (LLImageJ2C) | 267 | // getRawDiscardLevel()by default returns mDiscardLevel, but may be overridden (LLImageJ2C) |
266 | virtual S8 getRawDiscardLevel() { return mDiscardLevel; } | 268 | virtual S8 getRawDiscardLevel() { return mDiscardLevel; } |
267 | 269 | ||
268 | BOOL load(const LLString& filename); | 270 | BOOL load(const std::string& filename); |
269 | BOOL save(const LLString& filename); | 271 | BOOL save(const std::string& filename); |
270 | 272 | ||
271 | virtual BOOL updateData() = 0; // pure virtual | 273 | virtual BOOL updateData() = 0; // pure virtual |
272 | void setData(U8 *data, S32 size); | 274 | void setData(U8 *data, S32 size); |
diff --git a/linden/indra/llimage/llimage.vcproj b/linden/indra/llimage/llimage.vcproj deleted file mode 100644 index d6689ae..0000000 --- a/linden/indra/llimage/llimage.vcproj +++ /dev/null | |||
@@ -1,229 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="7.10" | ||
5 | Name="llimage" | ||
6 | ProjectGUID="{681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}" | ||
7 | Keyword="Win32Proj"> | ||
8 | <Platforms> | ||
9 | <Platform | ||
10 | Name="Win32"/> | ||
11 | </Platforms> | ||
12 | <Configurations> | ||
13 | <Configuration | ||
14 | Name="Debug|Win32" | ||
15 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
16 | IntermediateDirectory="$(ConfigurationName)" | ||
17 | ConfigurationType="4" | ||
18 | CharacterSet="1"> | ||
19 | <Tool | ||
20 | Name="VCCLCompilerTool" | ||
21 | Optimization="0" | ||
22 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
23 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;LL_DEBUG;JPEG_SUPPORT" | ||
24 | MinimalRebuild="TRUE" | ||
25 | BasicRuntimeChecks="3" | ||
26 | RuntimeLibrary="1" | ||
27 | StructMemberAlignment="4" | ||
28 | ForceConformanceInForLoopScope="TRUE" | ||
29 | UsePrecompiledHeader="0" | ||
30 | WarningLevel="3" | ||
31 | WarnAsError="TRUE" | ||
32 | Detect64BitPortabilityProblems="FALSE" | ||
33 | DebugInformationFormat="4"/> | ||
34 | <Tool | ||
35 | Name="VCCustomBuildTool"/> | ||
36 | <Tool | ||
37 | Name="VCLibrarianTool" | ||
38 | OutputFile="$(OutDir)/llimage.lib"/> | ||
39 | <Tool | ||
40 | Name="VCMIDLTool"/> | ||
41 | <Tool | ||
42 | Name="VCPostBuildEventTool"/> | ||
43 | <Tool | ||
44 | Name="VCPreBuildEventTool"/> | ||
45 | <Tool | ||
46 | Name="VCPreLinkEventTool"/> | ||
47 | <Tool | ||
48 | Name="VCResourceCompilerTool"/> | ||
49 | <Tool | ||
50 | Name="VCWebServiceProxyGeneratorTool"/> | ||
51 | <Tool | ||
52 | Name="VCXMLDataGeneratorTool"/> | ||
53 | <Tool | ||
54 | Name="VCManagedWrapperGeneratorTool"/> | ||
55 | <Tool | ||
56 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
57 | </Configuration> | ||
58 | <Configuration | ||
59 | Name="Release|Win32" | ||
60 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
61 | IntermediateDirectory="$(ConfigurationName)" | ||
62 | ConfigurationType="4" | ||
63 | CharacterSet="1"> | ||
64 | <Tool | ||
65 | Name="VCCLCompilerTool" | ||
66 | AdditionalOptions="/Oy-" | ||
67 | GlobalOptimizations="TRUE" | ||
68 | InlineFunctionExpansion="2" | ||
69 | EnableIntrinsicFunctions="TRUE" | ||
70 | OptimizeForProcessor="3" | ||
71 | OptimizeForWindowsApplication="TRUE" | ||
72 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
73 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE;JPEG_SUPPORT" | ||
74 | RuntimeLibrary="0" | ||
75 | StructMemberAlignment="0" | ||
76 | ForceConformanceInForLoopScope="TRUE" | ||
77 | UsePrecompiledHeader="0" | ||
78 | WarningLevel="3" | ||
79 | WarnAsError="FALSE" | ||
80 | Detect64BitPortabilityProblems="FALSE" | ||
81 | DebugInformationFormat="3"/> | ||
82 | <Tool | ||
83 | Name="VCCustomBuildTool"/> | ||
84 | <Tool | ||
85 | Name="VCLibrarianTool" | ||
86 | OutputFile="$(OutDir)/llimage.lib"/> | ||
87 | <Tool | ||
88 | Name="VCMIDLTool"/> | ||
89 | <Tool | ||
90 | Name="VCPostBuildEventTool"/> | ||
91 | <Tool | ||
92 | Name="VCPreBuildEventTool"/> | ||
93 | <Tool | ||
94 | Name="VCPreLinkEventTool"/> | ||
95 | <Tool | ||
96 | Name="VCResourceCompilerTool"/> | ||
97 | <Tool | ||
98 | Name="VCWebServiceProxyGeneratorTool"/> | ||
99 | <Tool | ||
100 | Name="VCXMLDataGeneratorTool"/> | ||
101 | <Tool | ||
102 | Name="VCManagedWrapperGeneratorTool"/> | ||
103 | <Tool | ||
104 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
105 | </Configuration> | ||
106 | <Configuration | ||
107 | Name="ReleaseNoOpt|Win32" | ||
108 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
109 | IntermediateDirectory="$(ConfigurationName)" | ||
110 | ConfigurationType="4" | ||
111 | CharacterSet="1"> | ||
112 | <Tool | ||
113 | Name="VCCLCompilerTool" | ||
114 | AdditionalOptions="/Oy-" | ||
115 | Optimization="0" | ||
116 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
117 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE;JPEG_SUPPORT" | ||
118 | RuntimeLibrary="0" | ||
119 | StructMemberAlignment="0" | ||
120 | ForceConformanceInForLoopScope="TRUE" | ||
121 | UsePrecompiledHeader="0" | ||
122 | WarningLevel="3" | ||
123 | WarnAsError="TRUE" | ||
124 | Detect64BitPortabilityProblems="FALSE" | ||
125 | DebugInformationFormat="3"/> | ||
126 | <Tool | ||
127 | Name="VCCustomBuildTool"/> | ||
128 | <Tool | ||
129 | Name="VCLibrarianTool" | ||
130 | OutputFile="$(OutDir)/llimage.lib"/> | ||
131 | <Tool | ||
132 | Name="VCMIDLTool"/> | ||
133 | <Tool | ||
134 | Name="VCPostBuildEventTool"/> | ||
135 | <Tool | ||
136 | Name="VCPreBuildEventTool"/> | ||
137 | <Tool | ||
138 | Name="VCPreLinkEventTool"/> | ||
139 | <Tool | ||
140 | Name="VCResourceCompilerTool"/> | ||
141 | <Tool | ||
142 | Name="VCWebServiceProxyGeneratorTool"/> | ||
143 | <Tool | ||
144 | Name="VCXMLDataGeneratorTool"/> | ||
145 | <Tool | ||
146 | Name="VCManagedWrapperGeneratorTool"/> | ||
147 | <Tool | ||
148 | Name="VCAuxiliaryManagedWrapperGeneratorTool"/> | ||
149 | </Configuration> | ||
150 | </Configurations> | ||
151 | <References> | ||
152 | </References> | ||
153 | <Files> | ||
154 | <Filter | ||
155 | Name="Source Files" | ||
156 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | ||
157 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> | ||
158 | <File | ||
159 | RelativePath=".\llimage.cpp"> | ||
160 | </File> | ||
161 | <File | ||
162 | RelativePath=".\llimagebmp.cpp"> | ||
163 | </File> | ||
164 | <File | ||
165 | RelativePath=".\llimagedxt.cpp"> | ||
166 | </File> | ||
167 | <File | ||
168 | RelativePath=".\llimagej2c.cpp"> | ||
169 | </File> | ||
170 | <File | ||
171 | RelativePath=".\llimagejpeg.cpp"> | ||
172 | </File> | ||
173 | <File | ||
174 | RelativePath=".\llimagepng.cpp"> | ||
175 | </File> | ||
176 | <File | ||
177 | RelativePath=".\llimagetga.cpp"> | ||
178 | </File> | ||
179 | <File | ||
180 | RelativePath=".\llimageworker.cpp"> | ||
181 | </File> | ||
182 | <File | ||
183 | RelativePath=".\llpngwrapper.cpp"> | ||
184 | </File> | ||
185 | </Filter> | ||
186 | <Filter | ||
187 | Name="Header Files" | ||
188 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | ||
189 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> | ||
190 | <File | ||
191 | RelativePath=".\llimage.h"> | ||
192 | </File> | ||
193 | <File | ||
194 | RelativePath=".\llimagebmp.h"> | ||
195 | </File> | ||
196 | <File | ||
197 | RelativePath=".\llimageconstants.h"> | ||
198 | </File> | ||
199 | <File | ||
200 | RelativePath=".\llimagedxt.h"> | ||
201 | </File> | ||
202 | <File | ||
203 | RelativePath=".\llimagej2c.h"> | ||
204 | </File> | ||
205 | <File | ||
206 | RelativePath=".\llimagejpeg.h"> | ||
207 | </File> | ||
208 | <File | ||
209 | RelativePath=".\llimagepng.h"> | ||
210 | </File> | ||
211 | <File | ||
212 | RelativePath=".\llimagetga.h"> | ||
213 | </File> | ||
214 | <File | ||
215 | RelativePath=".\llimageworker.h"> | ||
216 | </File> | ||
217 | <File | ||
218 | RelativePath=".\llpngwrapper.h"> | ||
219 | </File> | ||
220 | </Filter> | ||
221 | <Filter | ||
222 | Name="Resource Files" | ||
223 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | ||
224 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> | ||
225 | </Filter> | ||
226 | </Files> | ||
227 | <Globals> | ||
228 | </Globals> | ||
229 | </VisualStudioProject> | ||
diff --git a/linden/indra/llimage/llimage_vc8.vcproj b/linden/indra/llimage/llimage_vc8.vcproj deleted file mode 100644 index 4265ea4..0000000 --- a/linden/indra/llimage/llimage_vc8.vcproj +++ /dev/null | |||
@@ -1,325 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="8.00" | ||
5 | Name="llimage" | ||
6 | ProjectGUID="{681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}" | ||
7 | RootNamespace="llimage" | ||
8 | Keyword="Win32Proj" | ||
9 | > | ||
10 | <Platforms> | ||
11 | <Platform | ||
12 | Name="Win32" | ||
13 | /> | ||
14 | </Platforms> | ||
15 | <ToolFiles> | ||
16 | </ToolFiles> | ||
17 | <Configurations> | ||
18 | <Configuration | ||
19 | Name="Debug|Win32" | ||
20 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
21 | IntermediateDirectory="$(ConfigurationName)" | ||
22 | ConfigurationType="4" | ||
23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
24 | CharacterSet="1" | ||
25 | > | ||
26 | <Tool | ||
27 | Name="VCPreBuildEventTool" | ||
28 | /> | ||
29 | <Tool | ||
30 | Name="VCCustomBuildTool" | ||
31 | /> | ||
32 | <Tool | ||
33 | Name="VCXMLDataGeneratorTool" | ||
34 | /> | ||
35 | <Tool | ||
36 | Name="VCWebServiceProxyGeneratorTool" | ||
37 | /> | ||
38 | <Tool | ||
39 | Name="VCMIDLTool" | ||
40 | /> | ||
41 | <Tool | ||
42 | Name="VCCLCompilerTool" | ||
43 | Optimization="0" | ||
44 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
45 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;JPEG_SUPPORT" | ||
46 | MinimalRebuild="true" | ||
47 | BasicRuntimeChecks="3" | ||
48 | RuntimeLibrary="1" | ||
49 | StructMemberAlignment="4" | ||
50 | TreatWChar_tAsBuiltInType="false" | ||
51 | ForceConformanceInForLoopScope="true" | ||
52 | UsePrecompiledHeader="0" | ||
53 | WarningLevel="3" | ||
54 | WarnAsError="true" | ||
55 | Detect64BitPortabilityProblems="false" | ||
56 | DebugInformationFormat="4" | ||
57 | /> | ||
58 | <Tool | ||
59 | Name="VCManagedResourceCompilerTool" | ||
60 | /> | ||
61 | <Tool | ||
62 | Name="VCResourceCompilerTool" | ||
63 | /> | ||
64 | <Tool | ||
65 | Name="VCPreLinkEventTool" | ||
66 | /> | ||
67 | <Tool | ||
68 | Name="VCLibrarianTool" | ||
69 | OutputFile="$(OutDir)/llimage.lib" | ||
70 | /> | ||
71 | <Tool | ||
72 | Name="VCALinkTool" | ||
73 | /> | ||
74 | <Tool | ||
75 | Name="VCXDCMakeTool" | ||
76 | /> | ||
77 | <Tool | ||
78 | Name="VCBscMakeTool" | ||
79 | /> | ||
80 | <Tool | ||
81 | Name="VCFxCopTool" | ||
82 | /> | ||
83 | <Tool | ||
84 | Name="VCPostBuildEventTool" | ||
85 | /> | ||
86 | </Configuration> | ||
87 | <Configuration | ||
88 | Name="Release|Win32" | ||
89 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
90 | IntermediateDirectory="$(ConfigurationName)" | ||
91 | ConfigurationType="4" | ||
92 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
93 | CharacterSet="1" | ||
94 | > | ||
95 | <Tool | ||
96 | Name="VCPreBuildEventTool" | ||
97 | /> | ||
98 | <Tool | ||
99 | Name="VCCustomBuildTool" | ||
100 | /> | ||
101 | <Tool | ||
102 | Name="VCXMLDataGeneratorTool" | ||
103 | /> | ||
104 | <Tool | ||
105 | Name="VCWebServiceProxyGeneratorTool" | ||
106 | /> | ||
107 | <Tool | ||
108 | Name="VCMIDLTool" | ||
109 | /> | ||
110 | <Tool | ||
111 | Name="VCCLCompilerTool" | ||
112 | AdditionalOptions="/Oy-" | ||
113 | InlineFunctionExpansion="2" | ||
114 | EnableIntrinsicFunctions="true" | ||
115 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
116 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;JPEG_SUPPORT" | ||
117 | RuntimeLibrary="0" | ||
118 | StructMemberAlignment="0" | ||
119 | TreatWChar_tAsBuiltInType="false" | ||
120 | ForceConformanceInForLoopScope="true" | ||
121 | UsePrecompiledHeader="0" | ||
122 | WarningLevel="3" | ||
123 | WarnAsError="false" | ||
124 | Detect64BitPortabilityProblems="false" | ||
125 | DebugInformationFormat="3" | ||
126 | /> | ||
127 | <Tool | ||
128 | Name="VCManagedResourceCompilerTool" | ||
129 | /> | ||
130 | <Tool | ||
131 | Name="VCResourceCompilerTool" | ||
132 | /> | ||
133 | <Tool | ||
134 | Name="VCPreLinkEventTool" | ||
135 | /> | ||
136 | <Tool | ||
137 | Name="VCLibrarianTool" | ||
138 | OutputFile="$(OutDir)/llimage.lib" | ||
139 | /> | ||
140 | <Tool | ||
141 | Name="VCALinkTool" | ||
142 | /> | ||
143 | <Tool | ||
144 | Name="VCXDCMakeTool" | ||
145 | /> | ||
146 | <Tool | ||
147 | Name="VCBscMakeTool" | ||
148 | /> | ||
149 | <Tool | ||
150 | Name="VCFxCopTool" | ||
151 | /> | ||
152 | <Tool | ||
153 | Name="VCPostBuildEventTool" | ||
154 | /> | ||
155 | </Configuration> | ||
156 | <Configuration | ||
157 | Name="ReleaseNoOpt|Win32" | ||
158 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
159 | IntermediateDirectory="$(ConfigurationName)" | ||
160 | ConfigurationType="4" | ||
161 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
162 | CharacterSet="1" | ||
163 | > | ||
164 | <Tool | ||
165 | Name="VCPreBuildEventTool" | ||
166 | /> | ||
167 | <Tool | ||
168 | Name="VCCustomBuildTool" | ||
169 | /> | ||
170 | <Tool | ||
171 | Name="VCXMLDataGeneratorTool" | ||
172 | /> | ||
173 | <Tool | ||
174 | Name="VCWebServiceProxyGeneratorTool" | ||
175 | /> | ||
176 | <Tool | ||
177 | Name="VCMIDLTool" | ||
178 | /> | ||
179 | <Tool | ||
180 | Name="VCCLCompilerTool" | ||
181 | AdditionalOptions="/Oy-" | ||
182 | Optimization="0" | ||
183 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
184 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;JPEG_SUPPORT" | ||
185 | RuntimeLibrary="0" | ||
186 | StructMemberAlignment="0" | ||
187 | TreatWChar_tAsBuiltInType="false" | ||
188 | ForceConformanceInForLoopScope="true" | ||
189 | UsePrecompiledHeader="0" | ||
190 | WarningLevel="3" | ||
191 | WarnAsError="true" | ||
192 | Detect64BitPortabilityProblems="false" | ||
193 | DebugInformationFormat="3" | ||
194 | /> | ||
195 | <Tool | ||
196 | Name="VCManagedResourceCompilerTool" | ||
197 | /> | ||
198 | <Tool | ||
199 | Name="VCResourceCompilerTool" | ||
200 | /> | ||
201 | <Tool | ||
202 | Name="VCPreLinkEventTool" | ||
203 | /> | ||
204 | <Tool | ||
205 | Name="VCLibrarianTool" | ||
206 | OutputFile="$(OutDir)/llimage.lib" | ||
207 | /> | ||
208 | <Tool | ||
209 | Name="VCALinkTool" | ||
210 | /> | ||
211 | <Tool | ||
212 | Name="VCXDCMakeTool" | ||
213 | /> | ||
214 | <Tool | ||
215 | Name="VCBscMakeTool" | ||
216 | /> | ||
217 | <Tool | ||
218 | Name="VCFxCopTool" | ||
219 | /> | ||
220 | <Tool | ||
221 | Name="VCPostBuildEventTool" | ||
222 | /> | ||
223 | </Configuration> | ||
224 | </Configurations> | ||
225 | <References> | ||
226 | </References> | ||
227 | <Files> | ||
228 | <Filter | ||
229 | Name="Source Files" | ||
230 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | ||
231 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" | ||
232 | > | ||
233 | <File | ||
234 | RelativePath=".\llimage.cpp" | ||
235 | > | ||
236 | </File> | ||
237 | <File | ||
238 | RelativePath=".\llimagebmp.cpp" | ||
239 | > | ||
240 | </File> | ||
241 | <File | ||
242 | RelativePath=".\llimagedxt.cpp" | ||
243 | > | ||
244 | </File> | ||
245 | <File | ||
246 | RelativePath=".\llimagej2c.cpp" | ||
247 | > | ||
248 | </File> | ||
249 | <File | ||
250 | RelativePath=".\llimagejpeg.cpp" | ||
251 | > | ||
252 | </File> | ||
253 | <File | ||
254 | RelativePath=".\llimagepng.cpp" | ||
255 | > | ||
256 | </File> | ||
257 | <File | ||
258 | RelativePath=".\llimagetga.cpp" | ||
259 | > | ||
260 | </File> | ||
261 | <File | ||
262 | RelativePath=".\llimageworker.cpp" | ||
263 | > | ||
264 | </File> | ||
265 | <File | ||
266 | RelativePath=".\llpngwrapper.cpp" | ||
267 | > | ||
268 | </File> | ||
269 | </Filter> | ||
270 | <Filter | ||
271 | Name="Header Files" | ||
272 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | ||
273 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" | ||
274 | > | ||
275 | <File | ||
276 | RelativePath=".\llimage.h" | ||
277 | > | ||
278 | </File> | ||
279 | <File | ||
280 | RelativePath=".\llimagebmp.h" | ||
281 | > | ||
282 | </File> | ||
283 | <File | ||
284 | RelativePath=".\llimageconstants.h" | ||
285 | > | ||
286 | </File> | ||
287 | <File | ||
288 | RelativePath=".\llimagedxt.h" | ||
289 | > | ||
290 | </File> | ||
291 | <File | ||
292 | RelativePath=".\llimagej2c.h" | ||
293 | > | ||
294 | </File> | ||
295 | <File | ||
296 | RelativePath=".\llimagejpeg.h" | ||
297 | > | ||
298 | </File> | ||
299 | <File | ||
300 | RelativePath=".\llimagepng.h" | ||
301 | > | ||
302 | </File> | ||
303 | <File | ||
304 | RelativePath=".\llimagetga.h" | ||
305 | > | ||
306 | </File> | ||
307 | <File | ||
308 | RelativePath=".\llimageworker.h" | ||
309 | > | ||
310 | </File> | ||
311 | <File | ||
312 | RelativePath=".\llpngwrapper.h" | ||
313 | > | ||
314 | </File> | ||
315 | </Filter> | ||
316 | <Filter | ||
317 | Name="Resource Files" | ||
318 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | ||
319 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" | ||
320 | > | ||
321 | </Filter> | ||
322 | </Files> | ||
323 | <Globals> | ||
324 | </Globals> | ||
325 | </VisualStudioProject> | ||
diff --git a/linden/indra/llimage/llimage_vc9.vcproj b/linden/indra/llimage/llimage_vc9.vcproj deleted file mode 100644 index 244bc78..0000000 --- a/linden/indra/llimage/llimage_vc9.vcproj +++ /dev/null | |||
@@ -1,326 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="9.00" | ||
5 | Name="llimage" | ||
6 | ProjectGUID="{681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}" | ||
7 | RootNamespace="llimage" | ||
8 | Keyword="Win32Proj" | ||
9 | TargetFrameworkVersion="131072" | ||
10 | > | ||
11 | <Platforms> | ||
12 | <Platform | ||
13 | Name="Win32" | ||
14 | /> | ||
15 | </Platforms> | ||
16 | <ToolFiles> | ||
17 | </ToolFiles> | ||
18 | <Configurations> | ||
19 | <Configuration | ||
20 | Name="Debug|Win32" | ||
21 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
22 | IntermediateDirectory="$(ConfigurationName)" | ||
23 | ConfigurationType="4" | ||
24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
25 | CharacterSet="1" | ||
26 | > | ||
27 | <Tool | ||
28 | Name="VCPreBuildEventTool" | ||
29 | /> | ||
30 | <Tool | ||
31 | Name="VCCustomBuildTool" | ||
32 | /> | ||
33 | <Tool | ||
34 | Name="VCXMLDataGeneratorTool" | ||
35 | /> | ||
36 | <Tool | ||
37 | Name="VCWebServiceProxyGeneratorTool" | ||
38 | /> | ||
39 | <Tool | ||
40 | Name="VCMIDLTool" | ||
41 | /> | ||
42 | <Tool | ||
43 | Name="VCCLCompilerTool" | ||
44 | Optimization="0" | ||
45 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
46 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" | ||
47 | MinimalRebuild="true" | ||
48 | BasicRuntimeChecks="3" | ||
49 | RuntimeLibrary="1" | ||
50 | StructMemberAlignment="4" | ||
51 | TreatWChar_tAsBuiltInType="false" | ||
52 | ForceConformanceInForLoopScope="true" | ||
53 | UsePrecompiledHeader="0" | ||
54 | WarningLevel="3" | ||
55 | WarnAsError="true" | ||
56 | Detect64BitPortabilityProblems="false" | ||
57 | DebugInformationFormat="4" | ||
58 | /> | ||
59 | <Tool | ||
60 | Name="VCManagedResourceCompilerTool" | ||
61 | /> | ||
62 | <Tool | ||
63 | Name="VCResourceCompilerTool" | ||
64 | /> | ||
65 | <Tool | ||
66 | Name="VCPreLinkEventTool" | ||
67 | /> | ||
68 | <Tool | ||
69 | Name="VCLibrarianTool" | ||
70 | OutputFile="$(OutDir)/llimage.lib" | ||
71 | /> | ||
72 | <Tool | ||
73 | Name="VCALinkTool" | ||
74 | /> | ||
75 | <Tool | ||
76 | Name="VCXDCMakeTool" | ||
77 | /> | ||
78 | <Tool | ||
79 | Name="VCBscMakeTool" | ||
80 | /> | ||
81 | <Tool | ||
82 | Name="VCFxCopTool" | ||
83 | /> | ||
84 | <Tool | ||
85 | Name="VCPostBuildEventTool" | ||
86 | /> | ||
87 | </Configuration> | ||
88 | <Configuration | ||
89 | Name="Release|Win32" | ||
90 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
91 | IntermediateDirectory="$(ConfigurationName)" | ||
92 | ConfigurationType="4" | ||
93 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
94 | CharacterSet="1" | ||
95 | > | ||
96 | <Tool | ||
97 | Name="VCPreBuildEventTool" | ||
98 | /> | ||
99 | <Tool | ||
100 | Name="VCCustomBuildTool" | ||
101 | /> | ||
102 | <Tool | ||
103 | Name="VCXMLDataGeneratorTool" | ||
104 | /> | ||
105 | <Tool | ||
106 | Name="VCWebServiceProxyGeneratorTool" | ||
107 | /> | ||
108 | <Tool | ||
109 | Name="VCMIDLTool" | ||
110 | /> | ||
111 | <Tool | ||
112 | Name="VCCLCompilerTool" | ||
113 | AdditionalOptions="/Oy-" | ||
114 | InlineFunctionExpansion="2" | ||
115 | EnableIntrinsicFunctions="true" | ||
116 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
117 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | ||
118 | RuntimeLibrary="0" | ||
119 | StructMemberAlignment="0" | ||
120 | TreatWChar_tAsBuiltInType="false" | ||
121 | ForceConformanceInForLoopScope="true" | ||
122 | UsePrecompiledHeader="0" | ||
123 | WarningLevel="3" | ||
124 | WarnAsError="false" | ||
125 | Detect64BitPortabilityProblems="false" | ||
126 | DebugInformationFormat="3" | ||
127 | /> | ||
128 | <Tool | ||
129 | Name="VCManagedResourceCompilerTool" | ||
130 | /> | ||
131 | <Tool | ||
132 | Name="VCResourceCompilerTool" | ||
133 | /> | ||
134 | <Tool | ||
135 | Name="VCPreLinkEventTool" | ||
136 | /> | ||
137 | <Tool | ||
138 | Name="VCLibrarianTool" | ||
139 | OutputFile="$(OutDir)/llimage.lib" | ||
140 | /> | ||
141 | <Tool | ||
142 | Name="VCALinkTool" | ||
143 | /> | ||
144 | <Tool | ||
145 | Name="VCXDCMakeTool" | ||
146 | /> | ||
147 | <Tool | ||
148 | Name="VCBscMakeTool" | ||
149 | /> | ||
150 | <Tool | ||
151 | Name="VCFxCopTool" | ||
152 | /> | ||
153 | <Tool | ||
154 | Name="VCPostBuildEventTool" | ||
155 | /> | ||
156 | </Configuration> | ||
157 | <Configuration | ||
158 | Name="ReleaseNoOpt|Win32" | ||
159 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
160 | IntermediateDirectory="$(ConfigurationName)" | ||
161 | ConfigurationType="4" | ||
162 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
163 | CharacterSet="1" | ||
164 | > | ||
165 | <Tool | ||
166 | Name="VCPreBuildEventTool" | ||
167 | /> | ||
168 | <Tool | ||
169 | Name="VCCustomBuildTool" | ||
170 | /> | ||
171 | <Tool | ||
172 | Name="VCXMLDataGeneratorTool" | ||
173 | /> | ||
174 | <Tool | ||
175 | Name="VCWebServiceProxyGeneratorTool" | ||
176 | /> | ||
177 | <Tool | ||
178 | Name="VCMIDLTool" | ||
179 | /> | ||
180 | <Tool | ||
181 | Name="VCCLCompilerTool" | ||
182 | AdditionalOptions="/Oy-" | ||
183 | Optimization="0" | ||
184 | AdditionalIncludeDirectories="..\llcommon;..\llmath; ..\llvfs; ..\..\libraries\i686-win32\include;..\..\libraries\include\" | ||
185 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | ||
186 | RuntimeLibrary="0" | ||
187 | StructMemberAlignment="0" | ||
188 | TreatWChar_tAsBuiltInType="false" | ||
189 | ForceConformanceInForLoopScope="true" | ||
190 | UsePrecompiledHeader="0" | ||
191 | WarningLevel="3" | ||
192 | WarnAsError="true" | ||
193 | Detect64BitPortabilityProblems="false" | ||
194 | DebugInformationFormat="3" | ||
195 | /> | ||
196 | <Tool | ||
197 | Name="VCManagedResourceCompilerTool" | ||
198 | /> | ||
199 | <Tool | ||
200 | Name="VCResourceCompilerTool" | ||
201 | /> | ||
202 | <Tool | ||
203 | Name="VCPreLinkEventTool" | ||
204 | /> | ||
205 | <Tool | ||
206 | Name="VCLibrarianTool" | ||
207 | OutputFile="$(OutDir)/llimage.lib" | ||
208 | /> | ||
209 | <Tool | ||
210 | Name="VCALinkTool" | ||
211 | /> | ||
212 | <Tool | ||
213 | Name="VCXDCMakeTool" | ||
214 | /> | ||
215 | <Tool | ||
216 | Name="VCBscMakeTool" | ||
217 | /> | ||
218 | <Tool | ||
219 | Name="VCFxCopTool" | ||
220 | /> | ||
221 | <Tool | ||
222 | Name="VCPostBuildEventTool" | ||
223 | /> | ||
224 | </Configuration> | ||
225 | </Configurations> | ||
226 | <References> | ||
227 | </References> | ||
228 | <Files> | ||
229 | <Filter | ||
230 | Name="Source Files" | ||
231 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | ||
232 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" | ||
233 | > | ||
234 | <File | ||
235 | RelativePath=".\llimage.cpp" | ||
236 | > | ||
237 | </File> | ||
238 | <File | ||
239 | RelativePath=".\llimagebmp.cpp" | ||
240 | > | ||
241 | </File> | ||
242 | <File | ||
243 | RelativePath=".\llimagedxt.cpp" | ||
244 | > | ||
245 | </File> | ||
246 | <File | ||
247 | RelativePath=".\llimagej2c.cpp" | ||
248 | > | ||
249 | </File> | ||
250 | <File | ||
251 | RelativePath=".\llimagejpeg.cpp" | ||
252 | > | ||
253 | </File> | ||
254 | <File | ||
255 | RelativePath=".\llimagepng.cpp" | ||
256 | > | ||
257 | </File> | ||
258 | <File | ||
259 | RelativePath=".\llimagetga.cpp" | ||
260 | > | ||
261 | </File> | ||
262 | <File | ||
263 | RelativePath=".\llimageworker.cpp" | ||
264 | > | ||
265 | </File> | ||
266 | <File | ||
267 | RelativePath=".\llpngwrapper.cpp" | ||
268 | > | ||
269 | </File> | ||
270 | </Filter> | ||
271 | <Filter | ||
272 | Name="Header Files" | ||
273 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | ||
274 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" | ||
275 | > | ||
276 | <File | ||
277 | RelativePath=".\llimage.h" | ||
278 | > | ||
279 | </File> | ||
280 | <File | ||
281 | RelativePath=".\llimagebmp.h" | ||
282 | > | ||
283 | </File> | ||
284 | <File | ||
285 | RelativePath=".\llimageconstants.h" | ||
286 | > | ||
287 | </File> | ||
288 | <File | ||
289 | RelativePath=".\llimagedxt.h" | ||
290 | > | ||
291 | </File> | ||
292 | <File | ||
293 | RelativePath=".\llimagej2c.h" | ||
294 | > | ||
295 | </File> | ||
296 | <File | ||
297 | RelativePath=".\llimagejpeg.h" | ||
298 | > | ||
299 | </File> | ||
300 | <File | ||
301 | RelativePath=".\llimagepng.h" | ||
302 | > | ||
303 | </File> | ||
304 | <File | ||
305 | RelativePath=".\llimagetga.h" | ||
306 | > | ||
307 | </File> | ||
308 | <File | ||
309 | RelativePath=".\llimageworker.h" | ||
310 | > | ||
311 | </File> | ||
312 | <File | ||
313 | RelativePath=".\llpngwrapper.h" | ||
314 | > | ||
315 | </File> | ||
316 | </Filter> | ||
317 | <Filter | ||
318 | Name="Resource Files" | ||
319 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | ||
320 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" | ||
321 | > | ||
322 | </Filter> | ||
323 | </Files> | ||
324 | <Globals> | ||
325 | </Globals> | ||
326 | </VisualStudioProject> | ||
diff --git a/linden/indra/llimage/llimagebmp.cpp b/linden/indra/llimage/llimagebmp.cpp index 8764dff..c72eb24 100644 --- a/linden/indra/llimage/llimagebmp.cpp +++ b/linden/indra/llimage/llimagebmp.cpp | |||
@@ -647,10 +647,10 @@ BOOL LLImageBMP::encode(const LLImageRaw* raw_image, F32 encode_time) | |||
647 | break; | 647 | break; |
648 | } | 648 | } |
649 | 649 | ||
650 | for( S32 i = 0; i < alignment_bytes; i++ ) | 650 | } |
651 | { | 651 | for( S32 i = 0; i < alignment_bytes; i++ ) |
652 | *dst++ = 0; | 652 | { |
653 | } | 653 | *dst++ = 0; |
654 | } | 654 | } |
655 | } | 655 | } |
656 | 656 | ||
diff --git a/linden/indra/llimage/llimagebmp.h b/linden/indra/llimage/llimagebmp.h index 2b25c43..4a0d6fb 100644 --- a/linden/indra/llimage/llimagebmp.h +++ b/linden/indra/llimage/llimagebmp.h | |||
@@ -44,6 +44,7 @@ protected: | |||
44 | public: | 44 | public: |
45 | LLImageBMP(); | 45 | LLImageBMP(); |
46 | 46 | ||
47 | /*virtual*/ std::string getExtension() { return std::string("bmp"); } | ||
47 | /*virtual*/ BOOL updateData(); | 48 | /*virtual*/ BOOL updateData(); |
48 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); | 49 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); |
49 | /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time); | 50 | /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time); |
diff --git a/linden/indra/llimage/llimagedxt.h b/linden/indra/llimage/llimagedxt.h index f144c21..a3cb4c7 100644 --- a/linden/indra/llimage/llimagedxt.h +++ b/linden/indra/llimage/llimagedxt.h | |||
@@ -102,6 +102,7 @@ private: | |||
102 | public: | 102 | public: |
103 | LLImageDXT(); | 103 | LLImageDXT(); |
104 | 104 | ||
105 | /*virtual*/ std::string getExtension() { return std::string("dxt"); } | ||
105 | /*virtual*/ BOOL updateData(); | 106 | /*virtual*/ BOOL updateData(); |
106 | 107 | ||
107 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); | 108 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); |
diff --git a/linden/indra/llimage/llimagej2c.cpp b/linden/indra/llimage/llimagej2c.cpp index 9de4d5f..510b303 100644 --- a/linden/indra/llimage/llimagej2c.cpp +++ b/linden/indra/llimage/llimagej2c.cpp | |||
@@ -29,8 +29,8 @@ | |||
29 | */ | 29 | */ |
30 | #include "linden_common.h" | 30 | #include "linden_common.h" |
31 | 31 | ||
32 | #include <apr-1/apr_pools.h> | 32 | #include "apr_pools.h" |
33 | #include <apr-1/apr_dso.h> | 33 | #include "apr_dso.h" |
34 | 34 | ||
35 | #include "lldir.h" | 35 | #include "lldir.h" |
36 | #include "llimagej2c.h" | 36 | #include "llimagej2c.h" |
@@ -374,7 +374,7 @@ void LLImageJ2C::setReversible(const BOOL reversible) | |||
374 | } | 374 | } |
375 | 375 | ||
376 | 376 | ||
377 | BOOL LLImageJ2C::loadAndValidate(const LLString &filename) | 377 | BOOL LLImageJ2C::loadAndValidate(const std::string &filename) |
378 | { | 378 | { |
379 | resetLastError(); | 379 | resetLastError(); |
380 | 380 | ||
diff --git a/linden/indra/llimage/llimagej2c.h b/linden/indra/llimage/llimagej2c.h index 7e02c98..2b4a3ec 100644 --- a/linden/indra/llimage/llimagej2c.h +++ b/linden/indra/llimage/llimagej2c.h | |||
@@ -45,6 +45,7 @@ public: | |||
45 | LLImageJ2C(); | 45 | LLImageJ2C(); |
46 | 46 | ||
47 | // Base class overrides | 47 | // Base class overrides |
48 | /*virtual*/ std::string getExtension() { return std::string("j2c"); } | ||
48 | /*virtual*/ BOOL updateData(); | 49 | /*virtual*/ BOOL updateData(); |
49 | /*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time); | 50 | /*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time); |
50 | /*virtual*/ BOOL decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count); | 51 | /*virtual*/ BOOL decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count); |
@@ -58,7 +59,7 @@ public: | |||
58 | BOOL encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time=0.0); | 59 | BOOL encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time=0.0); |
59 | 60 | ||
60 | BOOL validate(U8 *data, U32 file_size); | 61 | BOOL validate(U8 *data, U32 file_size); |
61 | BOOL loadAndValidate(const LLString &filename); | 62 | BOOL loadAndValidate(const std::string &filename); |
62 | 63 | ||
63 | // Encode accessors | 64 | // Encode accessors |
64 | void setReversible(const BOOL reversible); // Use non-lossy? | 65 | void setReversible(const BOOL reversible); // Use non-lossy? |
diff --git a/linden/indra/llimage/llimagejpeg.cpp b/linden/indra/llimage/llimagejpeg.cpp index 0ffa838..68529b6 100644 --- a/linden/indra/llimage/llimagejpeg.cpp +++ b/linden/indra/llimage/llimagejpeg.cpp | |||
@@ -35,12 +35,13 @@ | |||
35 | 35 | ||
36 | #include "llerror.h" | 36 | #include "llerror.h" |
37 | 37 | ||
38 | LLImageJPEG::LLImageJPEG() | 38 | jmp_buf LLImageJPEG::sSetjmpBuffer ; |
39 | LLImageJPEG::LLImageJPEG(S32 quality) | ||
39 | : | 40 | : |
40 | LLImageFormatted(IMG_CODEC_JPEG), | 41 | LLImageFormatted(IMG_CODEC_JPEG), |
41 | mOutputBuffer( NULL ), | 42 | mOutputBuffer( NULL ), |
42 | mOutputBufferSize( 0 ), | 43 | mOutputBufferSize( 0 ), |
43 | mEncodeQuality( 75 ) // on a scale from 1 to 100 | 44 | mEncodeQuality( quality ) // on a scale from 1 to 100 |
44 | { | 45 | { |
45 | } | 46 | } |
46 | 47 | ||
@@ -76,7 +77,16 @@ BOOL LLImageJPEG::updateData() | |||
76 | jerr.error_exit = &LLImageJPEG::errorExit; // Error exit handler: does not return to caller | 77 | jerr.error_exit = &LLImageJPEG::errorExit; // Error exit handler: does not return to caller |
77 | jerr.emit_message = &LLImageJPEG::errorEmitMessage; // Conditionally emit a trace or warning message | 78 | jerr.emit_message = &LLImageJPEG::errorEmitMessage; // Conditionally emit a trace or warning message |
78 | jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message | 79 | jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message |
79 | 80 | ||
81 | // | ||
82 | //try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error | ||
83 | //so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao | ||
84 | // | ||
85 | if(setjmp(sSetjmpBuffer)) | ||
86 | { | ||
87 | jpeg_destroy_decompress(&cinfo); | ||
88 | return FALSE; | ||
89 | } | ||
80 | try | 90 | try |
81 | { | 91 | { |
82 | // Now we can initialize the JPEG decompression object. | 92 | // Now we can initialize the JPEG decompression object. |
@@ -208,7 +218,15 @@ BOOL LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) | |||
208 | jerr.emit_message = &LLImageJPEG::errorEmitMessage; // Conditionally emit a trace or warning message | 218 | jerr.emit_message = &LLImageJPEG::errorEmitMessage; // Conditionally emit a trace or warning message |
209 | jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message | 219 | jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message |
210 | 220 | ||
211 | 221 | // | |
222 | //try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error | ||
223 | //so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao | ||
224 | // | ||
225 | if(setjmp(sSetjmpBuffer)) | ||
226 | { | ||
227 | jpeg_destroy_decompress(&cinfo); | ||
228 | return FALSE; | ||
229 | } | ||
212 | try | 230 | try |
213 | { | 231 | { |
214 | // Now we can initialize the JPEG decompression object. | 232 | // Now we can initialize the JPEG decompression object. |
@@ -402,7 +420,7 @@ void LLImageJPEG::errorExit( j_common_ptr cinfo ) | |||
402 | jpeg_destroy(cinfo); | 420 | jpeg_destroy(cinfo); |
403 | 421 | ||
404 | // Return control to the setjmp point | 422 | // Return control to the setjmp point |
405 | throw 1; | 423 | longjmp(sSetjmpBuffer, 1) ; |
406 | } | 424 | } |
407 | 425 | ||
408 | // Decide whether to emit a trace or warning message. | 426 | // Decide whether to emit a trace or warning message. |
@@ -500,8 +518,11 @@ BOOL LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time ) | |||
500 | jerr.emit_message = &LLImageJPEG::errorEmitMessage; // Conditionally emit a trace or warning message | 518 | jerr.emit_message = &LLImageJPEG::errorEmitMessage; // Conditionally emit a trace or warning message |
501 | jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message | 519 | jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message |
502 | 520 | ||
503 | // Establish the setjmp return context mSetjmpBuffer. Used by library to abort. | 521 | // |
504 | if( setjmp(mSetjmpBuffer) ) | 522 | //try/catch will crash on Mac and Linux if LLImageJPEG::errorExit throws an error |
523 | //so as instead, we use setjmp/longjmp to avoid this crash, which is the best we can get. --bao | ||
524 | // | ||
525 | if( setjmp(sSetjmpBuffer) ) | ||
505 | { | 526 | { |
506 | // If we get here, the JPEG code has signaled an error. | 527 | // If we get here, the JPEG code has signaled an error. |
507 | // We need to clean up the JPEG object, close the input file, and return. | 528 | // We need to clean up the JPEG object, close the input file, and return. |
diff --git a/linden/indra/llimage/llimagejpeg.h b/linden/indra/llimage/llimagejpeg.h index a890bf4..79dc1a3 100644 --- a/linden/indra/llimage/llimagejpeg.h +++ b/linden/indra/llimage/llimagejpeg.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #ifndef LL_LLIMAGEJPEG_H | 32 | #ifndef LL_LLIMAGEJPEG_H |
33 | #define LL_LLIMAGEJPEG_H | 33 | #define LL_LLIMAGEJPEG_H |
34 | 34 | ||
35 | #include <setjmp.h> | 35 | #include <csetjmp> |
36 | 36 | ||
37 | #include "llimage.h" | 37 | #include "llimage.h" |
38 | 38 | ||
@@ -52,8 +52,9 @@ protected: | |||
52 | virtual ~LLImageJPEG(); | 52 | virtual ~LLImageJPEG(); |
53 | 53 | ||
54 | public: | 54 | public: |
55 | LLImageJPEG(); | 55 | LLImageJPEG(S32 quality = 75); |
56 | 56 | ||
57 | /*virtual*/ std::string getExtension() { return std::string("jpg"); } | ||
57 | /*virtual*/ BOOL updateData(); | 58 | /*virtual*/ BOOL updateData(); |
58 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); | 59 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); |
59 | /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time); | 60 | /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time); |
@@ -83,8 +84,8 @@ protected: | |||
83 | S32 mOutputBufferSize; // bytes in mOuputBuffer | 84 | S32 mOutputBufferSize; // bytes in mOuputBuffer |
84 | 85 | ||
85 | S32 mEncodeQuality; // on a scale from 1 to 100 | 86 | S32 mEncodeQuality; // on a scale from 1 to 100 |
86 | 87 | private: | |
87 | jmp_buf mSetjmpBuffer; // To allow the library to abort. | 88 | static jmp_buf sSetjmpBuffer; // To allow the library to abort. |
88 | }; | 89 | }; |
89 | 90 | ||
90 | #endif // LL_LLIMAGEJPEG_H | 91 | #endif // LL_LLIMAGEJPEG_H |
diff --git a/linden/indra/llimage/llimagepng.h b/linden/indra/llimage/llimagepng.h index 7ca59cf..9d45fb0 100644 --- a/linden/indra/llimage/llimagepng.h +++ b/linden/indra/llimage/llimagepng.h | |||
@@ -42,9 +42,10 @@ protected: | |||
42 | public: | 42 | public: |
43 | LLImagePNG(); | 43 | LLImagePNG(); |
44 | 44 | ||
45 | BOOL updateData(); | 45 | /*virtual*/ std::string getExtension() { return std::string("png"); } |
46 | BOOL decode(LLImageRaw* raw_image, F32 decode_time); | 46 | /*virtual*/ BOOL updateData(); |
47 | BOOL encode(const LLImageRaw* raw_image, F32 encode_time); | 47 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time); |
48 | /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time); | ||
48 | 49 | ||
49 | private: | 50 | private: |
50 | U8* mTmpWriteBuffer; | 51 | U8* mTmpWriteBuffer; |
diff --git a/linden/indra/llimage/llimagetga.cpp b/linden/indra/llimage/llimagetga.cpp index bd03abb..32c2111 100644 --- a/linden/indra/llimage/llimagetga.cpp +++ b/linden/indra/llimage/llimagetga.cpp | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include "linden_common.h" | 31 | #include "linden_common.h" |
32 | 32 | ||
33 | #include "lldir.h" | ||
33 | #include "llimagetga.h" | 34 | #include "llimagetga.h" |
34 | #include "llerror.h" | 35 | #include "llerror.h" |
35 | #include "llmath.h" | 36 | #include "llmath.h" |
@@ -63,11 +64,34 @@ LLImageTGA::LLImageTGA() | |||
63 | mColorMapStart( 0 ), | 64 | mColorMapStart( 0 ), |
64 | mColorMapLength( 0 ), | 65 | mColorMapLength( 0 ), |
65 | mColorMapBytesPerEntry( 0 ), | 66 | mColorMapBytesPerEntry( 0 ), |
66 | mIs15Bit( FALSE ) | 67 | mIs15Bit( FALSE ), |
68 | |||
69 | mAttributeBits(0), | ||
70 | mColorMapDepth(0), | ||
71 | mColorMapIndexHi(0), | ||
72 | mColorMapIndexLo(0), | ||
73 | mColorMapLengthHi(0), | ||
74 | mColorMapLengthLo(0), | ||
75 | mColorMapType(0), | ||
76 | mDataOffset(0), | ||
77 | mHeightHi(0), | ||
78 | mHeightLo(0), | ||
79 | mIDLength(0), | ||
80 | mImageType(0), | ||
81 | mInterleave(0), | ||
82 | mOriginRightBit(0), | ||
83 | mOriginTopBit(0), | ||
84 | mPixelSize(0), | ||
85 | mWidthHi(0), | ||
86 | mWidthLo(0), | ||
87 | mXOffsetHi(0), | ||
88 | mXOffsetLo(0), | ||
89 | mYOffsetHi(0), | ||
90 | mYOffsetLo(0) | ||
67 | { | 91 | { |
68 | } | 92 | } |
69 | 93 | ||
70 | LLImageTGA::LLImageTGA(const LLString& file_name) | 94 | LLImageTGA::LLImageTGA(const std::string& file_name) |
71 | : LLImageFormatted(IMG_CODEC_TGA), | 95 | : LLImageFormatted(IMG_CODEC_TGA), |
72 | mColorMap( NULL ), | 96 | mColorMap( NULL ), |
73 | mColorMapStart( 0 ), | 97 | mColorMapStart( 0 ), |
@@ -1113,7 +1137,7 @@ BOOL LLImageTGA::decodeAndProcess( LLImageRaw* raw_image, F32 domain, F32 weight | |||
1113 | } | 1137 | } |
1114 | 1138 | ||
1115 | // Reads a .tga file and creates an LLImageTGA with its data. | 1139 | // Reads a .tga file and creates an LLImageTGA with its data. |
1116 | bool LLImageTGA::loadFile( const LLString& path ) | 1140 | bool LLImageTGA::loadFile( const std::string& path ) |
1117 | { | 1141 | { |
1118 | S32 len = path.size(); | 1142 | S32 len = path.size(); |
1119 | if( len < 5 ) | 1143 | if( len < 5 ) |
@@ -1121,14 +1145,13 @@ bool LLImageTGA::loadFile( const LLString& path ) | |||
1121 | return false; | 1145 | return false; |
1122 | } | 1146 | } |
1123 | 1147 | ||
1124 | LLString extension = path.substr( len - 4, 4 ); | 1148 | std::string extension = gDirUtilp->getExtension(path); |
1125 | LLString::toLower(extension); | 1149 | if( "tga" != extension ) |
1126 | if( ".tga" != extension ) | ||
1127 | { | 1150 | { |
1128 | return false; | 1151 | return false; |
1129 | } | 1152 | } |
1130 | 1153 | ||
1131 | LLFILE* file = LLFile::fopen(path.c_str(), "rb"); /* Flawfinder: ignore */ | 1154 | LLFILE* file = LLFile::fopen(path, "rb"); /* Flawfinder: ignore */ |
1132 | if( !file ) | 1155 | if( !file ) |
1133 | { | 1156 | { |
1134 | llwarns << "Couldn't open file " << path << llendl; | 1157 | llwarns << "Couldn't open file " << path << llendl; |
diff --git a/linden/indra/llimage/llimagetga.h b/linden/indra/llimage/llimagetga.h index 475ffed..385e086 100644 --- a/linden/indra/llimage/llimagetga.h +++ b/linden/indra/llimage/llimagetga.h | |||
@@ -43,8 +43,9 @@ protected: | |||
43 | 43 | ||
44 | public: | 44 | public: |
45 | LLImageTGA(); | 45 | LLImageTGA(); |
46 | LLImageTGA(const LLString& file_name); | 46 | LLImageTGA(const std::string& file_name); |
47 | 47 | ||
48 | /*virtual*/ std::string getExtension() { return std::string("tga"); } | ||
48 | /*virtual*/ BOOL updateData(); | 49 | /*virtual*/ BOOL updateData(); |
49 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time=0.0); | 50 | /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time=0.0); |
50 | /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time=0.0); | 51 | /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time=0.0); |
@@ -70,7 +71,7 @@ private: | |||
70 | void decodeColorMapPixel24(U8* dst, const U8* src); | 71 | void decodeColorMapPixel24(U8* dst, const U8* src); |
71 | void decodeColorMapPixel32(U8* dst, const U8* src); | 72 | void decodeColorMapPixel32(U8* dst, const U8* src); |
72 | 73 | ||
73 | bool loadFile(const LLString& file_name); | 74 | bool loadFile(const std::string& file_name); |
74 | 75 | ||
75 | private: | 76 | private: |
76 | // Class specific data | 77 | // Class specific data |
diff --git a/linden/indra/llimage/llpngwrapper.cpp b/linden/indra/llimage/llpngwrapper.cpp index 0054adf..35b4ec3 100644 --- a/linden/indra/llimage/llpngwrapper.cpp +++ b/linden/indra/llimage/llpngwrapper.cpp | |||
@@ -42,17 +42,22 @@ | |||
42 | 42 | ||
43 | LLPngWrapper::LLPngWrapper() | 43 | LLPngWrapper::LLPngWrapper() |
44 | : mReadPngPtr( NULL ), | 44 | : mReadPngPtr( NULL ), |
45 | mReadInfoPtr( NULL ), | 45 | mReadInfoPtr( NULL ), |
46 | mWritePngPtr( NULL ), | 46 | mWritePngPtr( NULL ), |
47 | mWriteInfoPtr( NULL ), | 47 | mWriteInfoPtr( NULL ), |
48 | mRowPointers( NULL ), | 48 | mRowPointers( NULL ), |
49 | mWidth( 0 ), | ||
50 | mHeight( 0 ), | ||
49 | mBitDepth( 0 ), | 51 | mBitDepth( 0 ), |
50 | mColorType( 0 ), | 52 | mColorType( 0 ), |
51 | mChannels( 0 ), | 53 | mChannels( 0 ), |
52 | mInterlaceType( 0 ), | 54 | mInterlaceType( 0 ), |
53 | mCompressionType( 0 ), | 55 | mCompressionType( 0 ), |
54 | mFilterMethod( 0 ), | 56 | mFilterMethod( 0 ), |
55 | mFinalSize( 0 ) | 57 | mFinalSize( 0 ), |
58 | mHasBKGD(false), | ||
59 | mBackgroundColor(), | ||
60 | mGamma(0.f) | ||
56 | { | 61 | { |
57 | } | 62 | } |
58 | 63 | ||
@@ -384,7 +389,7 @@ U32 LLPngWrapper::getFinalSize() | |||
384 | } | 389 | } |
385 | 390 | ||
386 | // Get last error message, if any | 391 | // Get last error message, if any |
387 | LLString LLPngWrapper::getErrorMessage() | 392 | const std::string& LLPngWrapper::getErrorMessage() |
388 | { | 393 | { |
389 | return mErrorMessage; | 394 | return mErrorMessage; |
390 | } | 395 | } |
diff --git a/linden/indra/llimage/llpngwrapper.h b/linden/indra/llimage/llpngwrapper.h index b773b72..bd603c3 100644 --- a/linden/indra/llimage/llpngwrapper.h +++ b/linden/indra/llimage/llpngwrapper.h | |||
@@ -52,7 +52,7 @@ public: | |||
52 | BOOL readPng(U8* src, LLImageRaw* rawImage, ImageInfo *infop = NULL); | 52 | BOOL readPng(U8* src, LLImageRaw* rawImage, ImageInfo *infop = NULL); |
53 | BOOL writePng(const LLImageRaw* rawImage, U8* dst); | 53 | BOOL writePng(const LLImageRaw* rawImage, U8* dst); |
54 | U32 getFinalSize(); | 54 | U32 getFinalSize(); |
55 | LLString getErrorMessage(); | 55 | const std::string& getErrorMessage(); |
56 | 56 | ||
57 | protected: | 57 | protected: |
58 | void normalizeImage(); | 58 | void normalizeImage(); |
@@ -93,12 +93,12 @@ private: | |||
93 | 93 | ||
94 | U32 mFinalSize; | 94 | U32 mFinalSize; |
95 | 95 | ||
96 | BOOL mHasBKGD; | 96 | bool mHasBKGD; |
97 | png_color_16p mBackgroundColor; | 97 | png_color_16p mBackgroundColor; |
98 | 98 | ||
99 | F64 mGamma; | 99 | F64 mGamma; |
100 | 100 | ||
101 | LLString mErrorMessage; | 101 | std::string mErrorMessage; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | #endif | 104 | #endif |