Reapplied Hombres patch (revision c006f93a5f) as it got lost on the way.

This commit is contained in:
Philip Rinn
2010-09-13 10:44:42 +02:00
commit d1b551466f
598 changed files with 119742 additions and 0 deletions

42
rtengine/labimage.cc Normal file
View File

@@ -0,0 +1,42 @@
#include <labimage.h>
namespace rtengine {
LabImage::LabImage (int w, int h) : fromImage(false), W(w), H(h) {
L = new unsigned short*[H];
for (int i=0; i<H; i++)
L[i] = new unsigned short[W];
a = new short*[H];
for (int i=0; i<H; i++)
a[i] = new short[W];
b = new short*[H];
for (int i=0; i<H; i++)
b[i] = new short[W];
}
LabImage::LabImage (Image16* im) {
W = im->width;
H = im->height;
L = im->r;
a = (short**) im->g;
b = (short**) im->b;
fromImage = true;
}
LabImage::~LabImage () {
if (!fromImage) {
for (int i=0; i<H; i++) {
delete [] L[i];
delete [] a[i];
delete [] b[i];
}
delete [] L;
delete [] a;
delete [] b;
}
}
}