summaryrefslogtreecommitdiffstats
path: root/ue2/imgsynth2/cbitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ue2/imgsynth2/cbitmap.cpp')
-rw-r--r--ue2/imgsynth2/cbitmap.cpp25
1 files changed, 7 insertions, 18 deletions
diff --git a/ue2/imgsynth2/cbitmap.cpp b/ue2/imgsynth2/cbitmap.cpp
index ed26600..c2cd99a 100644
--- a/ue2/imgsynth2/cbitmap.cpp
+++ b/ue2/imgsynth2/cbitmap.cpp
@@ -28,18 +28,9 @@ CBitmap::~CBitmap()
28 m_pixelformat = NULL; 28 m_pixelformat = NULL;
29 29
30 /* delete colortable content */ 30 /* delete colortable content */
31 //TODO 31 map<string, CPixelFormat::RGBPIXEL *>::iterator it2;
32 /*map<string, CPixelFormat::RGBPIXEL *>::iterator it2; 32 for(it2 = m_colortable.begin(); it2 != m_colortable.end(); it2++)
33 for (it2 = m_colortable.begin(); it2 != m_colortable.end(); it2++) 33 delete (*it2).second;
34 delete (*it2).second;*/
35
36 map<string, map<string, uint32_t *> >::iterator it1;
37 map<string, uint32_t *>::iterator it2;
38 for(it1 = xpmColors.begin(); it1 != xpmColors.end(); it1++)
39 {
40 for(it2 = (*it1).second.begin(); it2 != (*it1).second.end(); it2++)
41 delete[] (*it2).second;
42 }
43} 34}
44 35
45/*----------------------------------------------------------------------------*/ 36/*----------------------------------------------------------------------------*/
@@ -153,13 +144,12 @@ void CBitmap::invert(std::list<std::string> params)
153 { 144 {
154 /* invert every entry in the colortable */ 145 /* invert every entry in the colortable */
155 map<string, CPixelFormat::RGBPIXEL *>::iterator it; 146 map<string, CPixelFormat::RGBPIXEL *>::iterator it;
156 //TODO 147 for (it = m_colortable.begin(); it != m_colortable.end(); it++)
157 /*for (it = m_colortable.begin(); it != m_colortable.end(); it++)
158 { 148 {
159 (*it).second->red = max.red - (*it).second->red; 149 (*it).second->red = max.red - (*it).second->red;
160 (*it).second->green = max.green - (*it).second->green; 150 (*it).second->green = max.green - (*it).second->green;
161 (*it).second->blue = max.blue - (*it).second->blue; 151 (*it).second->blue = max.blue - (*it).second->blue;
162 }*/ 152 }
163 } 153 }
164 else 154 else
165 { 155 {
@@ -223,13 +213,12 @@ void CBitmap::brightness(std::list<std::string> params)
223 { 213 {
224 /* invert every entry in the colortable */ 214 /* invert every entry in the colortable */
225 map<string, CPixelFormat::RGBPIXEL *>::iterator it; 215 map<string, CPixelFormat::RGBPIXEL *>::iterator it;
226 //TODO 216 for (it = m_colortable.begin(); it != m_colortable.end(); it++)
227 /*for (it = m_colortable.begin(); it != m_colortable.end(); it++)
228 { 217 {
229 (*it).second->red = min(max.red, static_cast<uint32_t>((*it).second->red * factor)); 218 (*it).second->red = min(max.red, static_cast<uint32_t>((*it).second->red * factor));
230 (*it).second->green = min(max.green, static_cast<uint32_t>((*it).second->green * factor)); 219 (*it).second->green = min(max.green, static_cast<uint32_t>((*it).second->green * factor));
231 (*it).second->blue = min(max.blue, static_cast<uint32_t>((*it).second->blue * factor)); 220 (*it).second->blue = min(max.blue, static_cast<uint32_t>((*it).second->blue * factor));
232 }*/ 221 }
233 } 222 }
234 else 223 else
235 { 224 {