Mercurial > hg > orthanc
comparison UnitTestsSources/ImageTests.cpp @ 2107:88831c3edd8f
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Oct 2016 17:22:09 +0200 |
parents | a1c1c606ce98 |
children | aa4b8895cd23 |
comparison
equal
deleted
inserted
replaced
2106:09cb73980740 | 2107:88831c3edd8f |
---|---|
209 TEST(JpegWriter, Basic) | 209 TEST(JpegWriter, Basic) |
210 { | 210 { |
211 std::string s; | 211 std::string s; |
212 | 212 |
213 { | 213 { |
214 Orthanc::Image img(Orthanc::PixelFormat_Grayscale8, 16, 16); | 214 Orthanc::Image img(Orthanc::PixelFormat_Grayscale8, 16, 16, false); |
215 for (unsigned int y = 0, value = 0; y < img.GetHeight(); y++) | 215 for (unsigned int y = 0, value = 0; y < img.GetHeight(); y++) |
216 { | 216 { |
217 uint8_t* p = reinterpret_cast<uint8_t*>(img.GetRow(y)); | 217 uint8_t* p = reinterpret_cast<uint8_t*>(img.GetRow(y)); |
218 for (unsigned int x = 0; x < img.GetWidth(); x++, p++) | 218 for (unsigned int x = 0; x < img.GetWidth(); x++, p++) |
219 { | 219 { |
256 } | 256 } |
257 | 257 |
258 | 258 |
259 TEST(Font, Basic) | 259 TEST(Font, Basic) |
260 { | 260 { |
261 Orthanc::Image s(Orthanc::PixelFormat_RGB24, 640, 480); | 261 Orthanc::Image s(Orthanc::PixelFormat_RGB24, 640, 480, false); |
262 memset(s.GetBuffer(), 0, s.GetPitch() * s.GetHeight()); | 262 memset(s.GetBuffer(), 0, s.GetPitch() * s.GetHeight()); |
263 | 263 |
264 ASSERT_GE(1u, Orthanc::Configuration::GetFontRegistry().GetSize()); | 264 ASSERT_GE(1u, Orthanc::Configuration::GetFontRegistry().GetSize()); |
265 Orthanc::Configuration::GetFontRegistry().GetFont(0).Draw(s, "Hello world É\n\rComment ça va ?\nq", 50, 60, 255, 0, 0); | 265 Orthanc::Configuration::GetFontRegistry().GetFont(0).Draw(s, "Hello world É\n\rComment ça va ?\nq", 50, 60, 255, 0, 0); |
266 | 266 |