comparison Resources/Orthanc/Core/Images/ImageProcessing.cpp @ 42:81e2651dca17

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Apr 2017 12:03:25 +0200
parents 7207a407bcd8
children
comparison
equal deleted inserted replaced
41:ed07f4bbf1a8 42:81e2651dca17
456 } 456 }
457 457
458 return; 458 return;
459 } 459 }
460 460
461 if (target.GetFormat() == PixelFormat_RGB24 &&
462 source.GetFormat() == PixelFormat_BGRA32)
463 {
464 for (unsigned int y = 0; y < source.GetHeight(); y++)
465 {
466 const uint8_t* p = reinterpret_cast<const uint8_t*>(source.GetConstRow(y));
467 uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(y));
468 for (unsigned int x = 0; x < source.GetWidth(); x++)
469 {
470 q[0] = p[2];
471 q[1] = p[1];
472 q[2] = p[0];
473 p += 4;
474 q += 3;
475 }
476 }
477
478 return;
479 }
480
461 if (target.GetFormat() == PixelFormat_RGBA32 && 481 if (target.GetFormat() == PixelFormat_RGBA32 &&
462 source.GetFormat() == PixelFormat_RGB24) 482 source.GetFormat() == PixelFormat_RGB24)
463 { 483 {
464 for (unsigned int y = 0; y < source.GetHeight(); y++) 484 for (unsigned int y = 0; y < source.GetHeight(); y++)
465 { 485 {