Do not save output images.
This commit is contained in:
parent
7c6cfd9046
commit
8175b8a06c
15
rotation.cpp
15
rotation.cpp
|
@ -1027,12 +1027,14 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double const step = 15;
|
||||||
|
|
||||||
// No tile
|
// No tile
|
||||||
Image img(argv[1]);
|
Image img(argv[1]);
|
||||||
float average = 0.0;
|
float average = 0.0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (double rotation = 0; rotation < 360; rotation += 45)
|
cout << "Simple image" << endl;
|
||||||
|
for (double rotation = 0; rotation < 360; rotation += step)
|
||||||
{
|
{
|
||||||
auto const before = chrono::high_resolution_clock::now();
|
auto const before = chrono::high_resolution_clock::now();
|
||||||
Image* const rotated = rotate(img, rotation);
|
Image* const rotated = rotate(img, rotation);
|
||||||
|
@ -1040,9 +1042,9 @@ int main(int argc, char* argv[])
|
||||||
auto const duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(after - before);
|
auto const duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(after - before);
|
||||||
average += duration_ms.count();
|
average += duration_ms.count();
|
||||||
|
|
||||||
cout << "rotate(" << rotation << "): " << duration_ms.count() << " ms" << endl;
|
//cout << "rotate(" << rotation << "): " << duration_ms.count() << " ms" << endl;
|
||||||
|
|
||||||
rotated->save(get_save_path("rotated", rotation));
|
//rotated->save(get_save_path("rotated", rotation));
|
||||||
delete rotated;
|
delete rotated;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
@ -1053,7 +1055,8 @@ int main(int argc, char* argv[])
|
||||||
TiledImage<16, 16> tiled_img(argv[1]);
|
TiledImage<16, 16> tiled_img(argv[1]);
|
||||||
average = 0.0;
|
average = 0.0;
|
||||||
i = 0;
|
i = 0;
|
||||||
for (double rotation = 0; rotation < 360; rotation += 45)
|
cout << "Tiled image" << endl;
|
||||||
|
for (double rotation = 0; rotation < 360; rotation += step)
|
||||||
{
|
{
|
||||||
auto const before = chrono::high_resolution_clock::now();
|
auto const before = chrono::high_resolution_clock::now();
|
||||||
auto const rotated = rotate(tiled_img, rotation);
|
auto const rotated = rotate(tiled_img, rotation);
|
||||||
|
@ -1061,9 +1064,9 @@ int main(int argc, char* argv[])
|
||||||
auto const duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(after - before);
|
auto const duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(after - before);
|
||||||
average += duration_ms.count();
|
average += duration_ms.count();
|
||||||
|
|
||||||
cout << "rotate tiled(" << rotation << "): " << duration_ms.count() << " ms" << endl;
|
//cout << "rotate tiled(" << rotation << "): " << duration_ms.count() << " ms" << endl;
|
||||||
|
|
||||||
rotated->save(get_save_path("rotated_tiled", rotation));
|
//rotated->save(get_save_path("rotated_tiled", rotation));
|
||||||
delete rotated;
|
delete rotated;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue