X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=image.cc;h=1194f066704a22d5f8d37676d7727d0d17258594;hb=94ef84aef3a1845326c7c43970997b701a919bd6;hp=e9eb83fed29b0d0ee0229d3e3ff503038f0107ab;hpb=d922ad61d35e9a6996730bec24b16f8bf7bc426c;p=folded-ctf.git diff --git a/image.cc b/image.cc index e9eb83f..1194f06 100644 --- 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++) {