1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "image_source_preview.h"
17 
18 #include "frameworks/base/image/image_source.h"
19 namespace OHOS::Ace {
Create(int32_t)20 RefPtr<ImageSource> ImageSource::Create(int32_t /* fd */)
21 {
22     return nullptr;
23 }
24 
Create(const uint8_t * data,uint32_t size)25 RefPtr<ImageSource> ImageSource::Create(const uint8_t* data, uint32_t size)
26 {
27     return nullptr;
28 }
29 
Create(const std::string & filePath)30 RefPtr<ImageSource> ImageSource::Create(const std::string& filePath)
31 {
32     return nullptr;
33 }
34 
IsAstc(const uint8_t * data,size_t size)35 bool ImageSource::IsAstc(const uint8_t* data, size_t size)
36 {
37     return false;
38 }
39 
GetASTCInfo(const uint8_t * data,size_t size)40 ImageSource::Size ImageSource::GetASTCInfo(const uint8_t* data, size_t size)
41 {
42     return { 0, 0 };
43 }
44 
GetProperty(const std::string &)45 std::string ImageSourcePreview::GetProperty(const std::string& /* key */)
46 {
47     return "";
48 }
49 
CreatePixelMap(const Size & size,AIImageQuality imageQuality,bool isHdrDecoderNeed)50 RefPtr<PixelMap> ImageSourcePreview::CreatePixelMap(
51     const Size& size, AIImageQuality imageQuality, bool isHdrDecoderNeed)
52 {
53     return nullptr;
54 }
55 
CreatePixelMap(uint32_t index,const Size & size,AIImageQuality imageQuality,bool isHdrDecoderNeed)56 RefPtr<PixelMap> ImageSourcePreview::CreatePixelMap(
57     uint32_t index, const Size& size, AIImageQuality imageQuality, bool isHdrDecoderNeed)
58 {
59     return nullptr;
60 }
61 
CreatePixelMap()62 RefPtr<PixelMap> ImageSourcePreview::CreatePixelMap()
63 {
64     return nullptr;
65 }
66 
GetImageSize()67 ImageSource::Size ImageSourcePreview::GetImageSize()
68 {
69     return {};
70 }
71 
GetFrameCount()72 uint32_t ImageSourcePreview::GetFrameCount()
73 {
74     return 0;
75 }
76 
GetEncodedFormat()77 std::string ImageSourcePreview::GetEncodedFormat()
78 {
79     return "";
80 }
81 } // namespace OHOS::Ace
82