automatic commit
[folded-ctf.git] / image.cc
index e9eb83f..1194f06 100644 (file)
--- a/image.cc
+++ b/image.cc
@@ -34,21 +34,6 @@ Image::~Image() {
   delete[] _content;
 }
 
-void Image::crop(int xmin, int ymin, int width, int height) {
-  ASSERT(xmin >= 0 && xmin + width <= _width &&
-         ymin >= 0 && ymin + height <= _height);
-  unsigned char *new_content = new unsigned char[width * height];
-  for(int y = 0; y < height; y++) {
-    for(int x = 0; x < width; x++) {
-      new_content[x + (y * width)] = _content[x + xmin + _width * (y + ymin)];
-    }
-  }
-  delete[] _content;
-  _content = new_content;
-  _width = width;
-  _height = height;
-}
-
 void Image::to_rgb(RGBImage *image) {
   int c;
   for(int y = 0; y < _height; y++) {