1 /** 2 * Copyright 2020-2021 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #include <algorithm> 17 18 #include "minddata/dataset/kernels/ir/vision/rgba_to_rgb_ir.h" 19 20 #ifndef ENABLE_ANDROID 21 #include "minddata/dataset/kernels/image/rgba_to_rgb_op.h" 22 #endif 23 24 #include "minddata/dataset/kernels/ir/validators.h" 25 26 namespace mindspore { 27 namespace dataset { 28 namespace vision { 29 #ifndef ENABLE_ANDROID 30 // RgbaToRgbOperation. RgbaToRgbOperation()31RgbaToRgbOperation::RgbaToRgbOperation() {} 32 33 RgbaToRgbOperation::~RgbaToRgbOperation() = default; 34 Name() const35std::string RgbaToRgbOperation::Name() const { return kRgbaToRgbOperation; } 36 ValidateParams()37Status RgbaToRgbOperation::ValidateParams() { return Status::OK(); } 38 Build()39std::shared_ptr<TensorOp> RgbaToRgbOperation::Build() { 40 std::shared_ptr<RgbaToRgbOp> tensor_op = std::make_shared<RgbaToRgbOp>(); 41 return tensor_op; 42 } 43 from_json(nlohmann::json op_params,std::shared_ptr<TensorOperation> * operation)44Status RgbaToRgbOperation::from_json(nlohmann::json op_params, std::shared_ptr<TensorOperation> *operation) { 45 *operation = std::make_shared<vision::RgbaToRgbOperation>(); 46 return Status::OK(); 47 } 48 #endif 49 } // namespace vision 50 } // namespace dataset 51 } // namespace mindspore 52