summaryrefslogtreecommitdiffstats
path: root/ue2/imgsynth2/cbitmap.cpp
diff options
context:
space:
mode:
authormanuel <manuel@nc8430.lan>2009-05-01 15:41:07 +0200
committermanuel <manuel@nc8430.lan>2009-05-01 15:41:07 +0200
commit766a0da4ab39c26e1d3b591f46cdadcfbe0f8a73 (patch)
treef383a621f2ad762e5be250c2ba9bd4c18bb02a0c /ue2/imgsynth2/cbitmap.cpp
parentf0442c8d058ae6007023ba1b898197db921e6ce1 (diff)
parentb0442de485dcb6328366d9b05a62af345e5fa39f (diff)
downloadooprog-766a0da4ab39c26e1d3b591f46cdadcfbe0f8a73.tar.gz
ooprog-766a0da4ab39c26e1d3b591f46cdadcfbe0f8a73.tar.bz2
ooprog-766a0da4ab39c26e1d3b591f46cdadcfbe0f8a73.zip
merge
Diffstat (limited to 'ue2/imgsynth2/cbitmap.cpp')
-rw-r--r--ue2/imgsynth2/cbitmap.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/ue2/imgsynth2/cbitmap.cpp b/ue2/imgsynth2/cbitmap.cpp
index a064130..ed26600 100644
--- a/ue2/imgsynth2/cbitmap.cpp
+++ b/ue2/imgsynth2/cbitmap.cpp
@@ -28,9 +28,18 @@ CBitmap::~CBitmap()
28 m_pixelformat = NULL; 28 m_pixelformat = NULL;
29 29
30 /* delete colortable content */ 30 /* delete colortable content */
31 map<string, CPixelFormat::RGBPIXEL *>::iterator it2; 31 //TODO
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 }
34} 43}
35 44
36/*----------------------------------------------------------------------------*/ 45/*----------------------------------------------------------------------------*/
@@ -144,12 +153,13 @@ void CBitmap::invert(std::list<std::string> params)
144 { 153 {
145 /* invert every entry in the colortable */ 154 /* invert every entry in the colortable */
146 map<string, CPixelFormat::RGBPIXEL *>::iterator it; 155 map<string, CPixelFormat::RGBPIXEL *>::iterator it;
147 for (it = m_colortable.begin(); it != m_colortable.end(); it++) 156 //TODO
157 /*for (it = m_colortable.begin(); it != m_colortable.end(); it++)
148 { 158 {
149 (*it).second->red = max.red - (*it).second->red; 159 (*it).second->red = max.red - (*it).second->red;
150 (*it).second->green = max.green - (*it).second->green; 160 (*it).second->green = max.green - (*it).second->green;
151 (*it).second->blue = max.blue - (*it).second->blue; 161 (*it).second->blue = max.blue - (*it).second->blue;
152 } 162 }*/
153 } 163 }
154 else 164 else
155 { 165 {
@@ -213,12 +223,13 @@ void CBitmap::brightness(std::list<std::string> params)
213 { 223 {
214 /* invert every entry in the colortable */ 224 /* invert every entry in the colortable */
215 map<string, CPixelFormat::RGBPIXEL *>::iterator it; 225 map<string, CPixelFormat::RGBPIXEL *>::iterator it;
216 for (it = m_colortable.begin(); it != m_colortable.end(); it++) 226 //TODO
227 /*for (it = m_colortable.begin(); it != m_colortable.end(); it++)
217 { 228 {
218 (*it).second->red = min(max.red, static_cast<uint32_t>((*it).second->red * factor)); 229 (*it).second->red = min(max.red, static_cast<uint32_t>((*it).second->red * factor));
219 (*it).second->green = min(max.green, static_cast<uint32_t>((*it).second->green * factor)); 230 (*it).second->green = min(max.green, static_cast<uint32_t>((*it).second->green * factor));
220 (*it).second->blue = min(max.blue, static_cast<uint32_t>((*it).second->blue * factor)); 231 (*it).second->blue = min(max.blue, static_cast<uint32_t>((*it).second->blue * factor));
221 } 232 }*/
222 } 233 }
223 else 234 else
224 { 235 {