From 0958592dccade5324e73e8308c3811b443fc1425 Mon Sep 17 00:00:00 2001 From: seungho Date: Tue, 22 Sep 2020 17:13:13 +0900 Subject: [PATCH] Invert pixel buffer y order of GetPixels in X-NativeImageSource - In the current implementation, the results of GetPixels are different for each platform. Change-Id: Ifa1cfd5d08a136c6bd2256af3a092c1f3463721d Signed-off-by: seungho --- dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp index 54ad246..d7dc6ed 100755 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp @@ -187,7 +187,7 @@ bool NativeImageSourceX::GetPixels(std::vector& pixbuf, unsigned& pixbuf.resize(width*height*3); unsigned char* bufPtr = &pixbuf[0]; - for(unsigned y = height-1; y < height; --y) + for(unsigned y = 0; y < height; ++y) { for(unsigned x = 0; x < width; ++x, bufPtr+=3) { @@ -218,7 +218,7 @@ bool NativeImageSourceX::GetPixels(std::vector& pixbuf, unsigned& const size_t copy_count = static_cast< size_t >( width ) * 4; pixelFormat = Pixel::BGRA8888; - for(unsigned y = height-1; y < height; --y, bufPtr += width) + for(unsigned y = 0; y < height; ++y, bufPtr += width) { const char * const in = pXImage->data + xDataLineSkip * y; -- 2.7.4