X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=image.cc;h=1194f066704a22d5f8d37676d7727d0d17258594;hp=e9eb83fed29b0d0ee0229d3e3ff503038f0107ab;hb=33852c7b378d419be75d15a9663ee6b071c2f534;hpb=789f96ef05fda4588aa536adb614c0e841be0812 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++) {