PNG
ImageSearch::rotate90(PNG& png) {
    PNG retImg;
    retImg.create(png.getHeight(), png.getWidth());
    PNGHelper ret(retImg), src(png);
    for(int row = 0; (row < png.getHeight()); row++) {
        for(int col = 0; (col < png.getWidth()); col++) {
	    ret(col, png.getHeight() - row - 1) = src(row, col);
        }
    }
    return retImg;
}
PNG
ImageSearch::flipVertical(PNG& png) { 
    const int height = png.getHeight(), width = png.getWidth();   
    PNG retImg;
    retImg.create(width, height);
    PNGHelper ret(retImg), src(png);

    for(int row = 0; (row < height); row++) {
        for(int col = 0; (col < width); col++) {
	    ret(height - row - 1, col) = src(row, col);
        }
    }
    return retImg;
}