aboutsummaryrefslogtreecommitdiff
path: root/src/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.cpp')
-rw-r--r--src/image.cpp39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/image.cpp b/src/image.cpp
index 77fe63c..e20b05e 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -2,24 +2,29 @@
#include <algorithm>
#include <cstdint>
-Image::Image(const Image& other)
+namespace TehImage
{
- this->colorValues = other.colorValues;
- this->bpp = other.bpp;
+
+ Image::Image(const Image& other)
+ {
+ this->colorValues = other.colorValues;
+ this->bpp = other.bpp;
- this->width = other.width;
- this->height = other.height;
- this->bitDepth = other.bitDepth;
- this->colorType = other.colorType;
- this->compressionMethod = other.compressionMethod;
- this->filterMethod = other.filterMethod;
- this->interlaceMethod = other.interlaceMethod;
+ this->width = other.width;
+ this->height = other.height;
+ this->bitDepth = other.bitDepth;
+ this->colorType = other.colorType;
+ this->compressionMethod = other.compressionMethod;
+ this->filterMethod = other.filterMethod;
+ this->interlaceMethod = other.interlaceMethod;
- pixels = std::make_unique<Pixel[]>(width*height);
- std::copy_n(other.pixels.get(), width*height, pixels.get());
-}
+ pixels = std::make_unique<Pixel[]>(width*height);
+ std::copy_n(other.pixels.get(), width*height, pixels.get());
+ }
-Pixel& Image::operator[](int x, int y)
-{
- return pixels[x + y*width];
-};
+ Pixel& Image::operator[](int x, int y)
+ {
+ return pixels[x + y*width];
+ };
+
+}