/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
if(planeLoader)
{
result = planeLoader(input, pixelBuffers);
- if(!result)
+ if(!result || pixelBuffers.empty())
{
DALI_LOG_ERROR("Unable to convert %s\n", path.c_str());
+ return false;
+ }
+
+ bool applyAttributes = true;
+ for(auto&& pixelBuffer : pixelBuffers)
+ {
+ pixelBuffer = Internal::Platform::ApplyAttributesToBitmap(pixelBuffer, resource.size, resource.scalingMode, resource.samplingMode);
+ if(!pixelBuffer)
+ {
+ applyAttributes = false;
+ break;
+ }
+ }
+ if(!applyAttributes)
+ {
+ DALI_LOG_ERROR("ApplyAttributesToBitmap is failed [%s]\n", path.c_str());
+ return false;
}
}
else
if(samplingMode == SamplingMode::BOX || samplingMode == SamplingMode::BOX_THEN_NEAREST || samplingMode == SamplingMode::BOX_THEN_LINEAR)
{
// Check the pixel format is one that is supported:
- if(pixelFormat == Pixel::RGBA8888 || pixelFormat == Pixel::RGB888 || pixelFormat == Pixel::RGB565 || pixelFormat == Pixel::LA88 || pixelFormat == Pixel::L8 || pixelFormat == Pixel::A8)
+ if(pixelFormat == Pixel::RGBA8888 || pixelFormat == Pixel::RGB888 || pixelFormat == Pixel::RGB565 || pixelFormat == Pixel::LA88 || pixelFormat == Pixel::L8 || pixelFormat == Pixel::A8 || pixelFormat == Pixel::CHROMINANCE_U || pixelFormat == Pixel::CHROMINANCE_V)
{
const BoxDimensionTest dimensionTest = DimensionTestForScalingMode(fittingMode);
}
case Pixel::L8:
case Pixel::A8:
+ case Pixel::CHROMINANCE_U:
+ case Pixel::CHROMINANCE_V:
{
Internal::Platform::DownscaleInPlacePow2SingleBytePerPixel(pixels, inputWidth, inputHeight, inputStride, desiredWidth, desiredHeight, dimensionTest, outWidth, outHeight, outStride);
break;
uint32_t desiredHeight)
{
// Check the pixel format is one that is supported:
- if(pixelFormat == Pixel::RGBA8888 || pixelFormat == Pixel::RGB888 || pixelFormat == Pixel::RGB565 || pixelFormat == Pixel::LA88 || pixelFormat == Pixel::L8 || pixelFormat == Pixel::A8)
+ if(pixelFormat == Pixel::RGBA8888 || pixelFormat == Pixel::RGB888 || pixelFormat == Pixel::RGB565 || pixelFormat == Pixel::LA88 || pixelFormat == Pixel::L8 || pixelFormat == Pixel::A8 || pixelFormat == Pixel::CHROMINANCE_U || pixelFormat == Pixel::CHROMINANCE_V)
{
switch(pixelFormat)
{
}
case Pixel::L8:
case Pixel::A8:
+ case Pixel::CHROMINANCE_U:
+ case Pixel::CHROMINANCE_V:
{
PointSample1BPP(inPixels, inputWidth, inputHeight, inputStride, outPixels, desiredWidth, desiredHeight);
break;
ImageDimensions outDimensions)
{
// Check the pixel format is one that is supported:
- if(pixelFormat == Pixel::RGB888 || pixelFormat == Pixel::RGBA8888 || pixelFormat == Pixel::L8 || pixelFormat == Pixel::A8 || pixelFormat == Pixel::LA88 || pixelFormat == Pixel::RGB565)
+ if(pixelFormat == Pixel::RGB888 || pixelFormat == Pixel::RGBA8888 || pixelFormat == Pixel::L8 || pixelFormat == Pixel::A8 || pixelFormat == Pixel::LA88 || pixelFormat == Pixel::RGB565 || pixelFormat == Pixel::CHROMINANCE_U || pixelFormat == Pixel::CHROMINANCE_V)
{
switch(pixelFormat)
{
}
case Pixel::L8:
case Pixel::A8:
+ case Pixel::CHROMINANCE_U:
+ case Pixel::CHROMINANCE_V:
{
LinearSample1BPP(inPixels, inDimensions, inStride, outPixels, outDimensions);
break;