Mercurial > hg > orthanc-webviewer
diff UnitTestsSources/UnitTestsMain.cpp @ 79:abdde1dfb3eb
use sdk 0.9.4
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Sep 2015 12:32:37 +0200 |
parents | a92e96943496 |
children | 3809121c3290 |
line wrap: on
line diff
--- a/UnitTestsSources/UnitTestsMain.cpp Fri Sep 25 11:29:17 2015 +0200 +++ b/UnitTestsSources/UnitTestsMain.cpp Fri Sep 25 12:32:37 2015 +0200 @@ -26,13 +26,10 @@ #include "../Orthanc/Core/OrthancException.h" #include "../Orthanc/Core/Toolbox.h" -#include "../Orthanc/Core/ImageFormats/ImageBuffer.h" -#include "../Orthanc/Core/ImageFormats/PngWriter.h" #include "../Plugin/Cache/CacheManager.h" #include "../Plugin/Cache/CacheScheduler.h" #include "../Plugin/Cache/ICacheFactory.h" #include "../Plugin/Cache/ICacheFactory.h" -#include "../Plugin/JpegWriter.h" using namespace OrthancPlugins; @@ -189,29 +186,6 @@ -TEST(JpegWriter, Basic) -{ - Orthanc::ImageBuffer img(16, 16, Orthanc::PixelFormat_Grayscale8); - Orthanc::ImageAccessor accessor = img.GetAccessor(); - for (unsigned int y = 0, value = 0; y < img.GetHeight(); y++) - { - uint8_t* p = reinterpret_cast<uint8_t*>(accessor.GetRow(y)); - for (unsigned int x = 0; x < img.GetWidth(); x++, p++) - { - *p = value++; - } - } - - JpegWriter w; - w.WriteToFile("UnitTestsResults/hello.jpg", accessor); - - std::string s; - w.WriteToMemory(s, accessor); - Orthanc::Toolbox::WriteFile(s, "UnitTestsResults/hello2.jpg"); -} - - - int main(int argc, char **argv) { argc_ = argc;