summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-06-03 13:59:11 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-06-03 13:59:11 -0400
commitbad06f68fc3122b5b83f21f1fa8bc7e7ec53bfc8 (patch)
treecdf1bdc9f6c665eba22645ce4a1fdf7c34d55321 /indra/llimage
parent211d1dfb770aa029d77cd231815a5848640b54a6 (diff)
parentaf8c2bc94868e056908b4ae2fc285925cd68b56b (diff)
Merge. Refresh from viewer-release merged with in-progress work.
Diffstat (limited to 'indra/llimage')
-rwxr-xr-x[-rw-r--r--]indra/llimage/CMakeLists.txt13
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimage.cpp23
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimage.h5
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagebmp.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagebmp.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagedimensionsinfo.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagedimensionsinfo.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagedxt.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagedxt.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagej2c.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagej2c.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagejpeg.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagejpeg.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagepng.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagepng.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagetga.cpp12
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagetga.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimageworker.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimageworker.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llmapimagetype.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llpngwrapper.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llimage/llpngwrapper.h0
-rwxr-xr-x[-rw-r--r--]indra/llimage/tests/llimageworker_test.cpp0
23 files changed, 46 insertions, 7 deletions
diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt
index ea8c1a1107..e837b0cac2 100644..100755
--- a/indra/llimage/CMakeLists.txt
+++ b/indra/llimage/CMakeLists.txt
@@ -7,12 +7,15 @@ include(LLCommon)
include(LLImage)
include(LLMath)
include(LLVFS)
+include(LLKDU)
+include(LLImageJ2COJ)
include(ZLIB)
include(LLAddBuildTest)
include(Tut)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLVFS_INCLUDE_DIRS}
${PNG_INCLUDE_DIRS}
@@ -56,8 +59,16 @@ list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES})
add_library (llimage ${llimage_SOURCE_FILES})
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
+if (USE_KDU)
+ target_link_libraries(llimage ${LLKDU_LIBRARIES})
+else (USE_KDU)
+ target_link_libraries(llimage ${LLIMAGEJ2COJ_LIBRARIES})
+endif (USE_KDU)
+
target_link_libraries(llimage
- llcommon
+ ${LLVFS_LIBRARIES}
+ ${LLMATH_LIBRARIES}
+ ${LLCOMMON_LIBRARIES}
${JPEG_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index a88ac148ef..1c25256e95 100644..100755
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -640,6 +640,29 @@ void LLImageRaw::compositeUnscaled4onto3( LLImageRaw* src )
}
}
+void LLImageRaw::copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill)
+{
+ LLImageRaw* dst = this; // Just for clarity.
+
+ llassert( 1 == src->getComponents() );
+ llassert( 4 == dst->getComponents() );
+ llassert( (src->getWidth() == dst->getWidth()) && (src->getHeight() == dst->getHeight()) );
+
+ S32 pixels = getWidth() * getHeight();
+ U8* src_data = src->getData();
+ U8* dst_data = dst->getData();
+ for ( S32 i = 0; i < pixels; i++ )
+ {
+ dst_data[0] = fill.mV[0];
+ dst_data[1] = fill.mV[1];
+ dst_data[2] = fill.mV[2];
+ dst_data[3] = src_data[0];
+ src_data += 1;
+ dst_data += 4;
+ }
+}
+
+
// Fill the buffer with a constant color
void LLImageRaw::fill( const LLColor4U& color )
{
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 6cb1226da0..4fc40ecff7 100644..100755
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -226,6 +226,11 @@ public:
// Src and dst are same size. Src has 3 components. Dst has 4 components.
void copyUnscaled3onto4( LLImageRaw* src );
+ // Src and dst are same size. Src has 1 component. Dst has 4 components.
+ // Alpha component is set to source alpha mask component.
+ // RGB components are set to fill color.
+ void copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill);
+
// Src and dst can be any size. Src and dst have same number of components.
void copyScaled( LLImageRaw* src );
diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp
index 60b1c628d7..60b1c628d7 100644..100755
--- a/indra/llimage/llimagebmp.cpp
+++ b/indra/llimage/llimagebmp.cpp
diff --git a/indra/llimage/llimagebmp.h b/indra/llimage/llimagebmp.h
index db0b45def0..db0b45def0 100644..100755
--- a/indra/llimage/llimagebmp.h
+++ b/indra/llimage/llimagebmp.h
diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp
index c6bfa50b40..c6bfa50b40 100644..100755
--- a/indra/llimage/llimagedimensionsinfo.cpp
+++ b/indra/llimage/llimagedimensionsinfo.cpp
diff --git a/indra/llimage/llimagedimensionsinfo.h b/indra/llimage/llimagedimensionsinfo.h
index 382fdb2a0e..382fdb2a0e 100644..100755
--- a/indra/llimage/llimagedimensionsinfo.h
+++ b/indra/llimage/llimagedimensionsinfo.h
diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp
index 34c6793522..34c6793522 100644..100755
--- a/indra/llimage/llimagedxt.cpp
+++ b/indra/llimage/llimagedxt.cpp
diff --git a/indra/llimage/llimagedxt.h b/indra/llimage/llimagedxt.h
index a8756ba8ed..a8756ba8ed 100644..100755
--- a/indra/llimage/llimagedxt.h
+++ b/indra/llimage/llimagedxt.h
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 5412f98ee5..5412f98ee5 100644..100755
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index ce8195940d..ce8195940d 100644..100755
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp
index b70f84efc8..b70f84efc8 100644..100755
--- a/indra/llimage/llimagejpeg.cpp
+++ b/indra/llimage/llimagejpeg.cpp
diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h
index 7ac7f5d2e0..7ac7f5d2e0 100644..100755
--- a/indra/llimage/llimagejpeg.h
+++ b/indra/llimage/llimagejpeg.h
diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp
index 294f68b122..294f68b122 100644..100755
--- a/indra/llimage/llimagepng.cpp
+++ b/indra/llimage/llimagepng.cpp
diff --git a/indra/llimage/llimagepng.h b/indra/llimage/llimagepng.h
index 1fbd850a2e..1fbd850a2e 100644..100755
--- a/indra/llimage/llimagepng.h
+++ b/indra/llimage/llimagepng.h
diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp
index 58426d31fa..920ae2891f 100644..100755
--- a/indra/llimage/llimagetga.cpp
+++ b/indra/llimage/llimagetga.cpp
@@ -132,12 +132,12 @@ BOOL LLImageTGA::updateData()
** FIELD 2 : COLOR MAP TYPE (1 BYTES)
** FIELD 3 : IMAGE TYPE CODE (1 BYTES)
** = 0 NO IMAGE DATA INCLUDED
- ** = 1 UNCOMPRESSED, COLOR-MAPPED IMAGE
- ** = 2 UNCOMPRESSED, TRUE-COLOR IMAGE
- ** = 3 UNCOMPRESSED, BLACK AND WHITE IMAGE
- ** = 9 RUN-LENGTH ENCODED COLOR-MAPPED IMAGE
- ** = 10 RUN-LENGTH ENCODED TRUE-COLOR IMAGE
- ** = 11 RUN-LENGTH ENCODED BLACK AND WHITE IMAGE
+ ** = (0001) 1 UNCOMPRESSED, COLOR-MAPPED IMAGE
+ ** = (0010) 2 UNCOMPRESSED, TRUE-COLOR IMAGE
+ ** = (0011) 3 UNCOMPRESSED, BLACK AND WHITE IMAGE
+ ** = (1001) 9 RUN-LENGTH ENCODED COLOR-MAPPED IMAGE
+ ** = (1010) 10 RUN-LENGTH ENCODED TRUE-COLOR IMAGE
+ ** = (1011) 11 RUN-LENGTH ENCODED BLACK AND WHITE IMAGE
** FIELD 4 : COLOR MAP SPECIFICATION (5 BYTES)
** 4.1 : COLOR MAP ORIGIN (2 BYTES)
** 4.2 : COLOR MAP LENGTH (2 BYTES)
diff --git a/indra/llimage/llimagetga.h b/indra/llimage/llimagetga.h
index 5da3525149..5da3525149 100644..100755
--- a/indra/llimage/llimagetga.h
+++ b/indra/llimage/llimagetga.h
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index ad2eb0f69c..ad2eb0f69c 100644..100755
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h
index 1bfb0ddfd3..1bfb0ddfd3 100644..100755
--- a/indra/llimage/llimageworker.h
+++ b/indra/llimage/llimageworker.h
diff --git a/indra/llimage/llmapimagetype.h b/indra/llimage/llmapimagetype.h
index 0a040d3db9..0a040d3db9 100644..100755
--- a/indra/llimage/llmapimagetype.h
+++ b/indra/llimage/llmapimagetype.h
diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp
index 2cc7d3c460..2cc7d3c460 100644..100755
--- a/indra/llimage/llpngwrapper.cpp
+++ b/indra/llimage/llpngwrapper.cpp
diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h
index 739f435996..739f435996 100644..100755
--- a/indra/llimage/llpngwrapper.h
+++ b/indra/llimage/llpngwrapper.h
diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp
index e255d65b43..e255d65b43 100644..100755
--- a/indra/llimage/tests/llimageworker_test.cpp
+++ b/indra/llimage/tests/llimageworker_test.cpp