1 // Copyright 2020 Google Inc. 2 // 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 17 #include "src/piex_types.h" 18 19 #ifndef PIEX_PIEX_CR3_H_ 20 #define PIEX_PIEX_CR3_H_ 21 22 namespace piex { 23 24 // Gets the EXIF orientation of a CR3 stream, returning true on success. 25 bool Cr3GetOrientation(StreamInterface* stream, std::uint32_t* orientation); 26 27 // Gets preview images of a CR3 stream, returning kOk on success. Assumes the 28 // stream is a CR3 stream. 29 // 30 // Canon's CR3 is based on ISO/IEC 14496-12: ISO base media file format. (CR2 is 31 // TIFF based.) A Canon CR3 contains multiple embedded images. Most cameras 32 // output CR3 files that contain a full-size JPEG, a 1620x1080 preview JPEG, and 33 // a 160x120 thumbnail JPEG. 34 // The Canon EOS 1D X Mark III, though, contains a full-size HEVC image, a 35 // 1620x1080 preview JPEG, and a 160x120 thumbnail JPEG. 36 // Until support for HEVC is added, this method returns the largest embedded 37 // JPEG in preview_image_data->preview. 38 // 39 Error Cr3GetPreviewData(StreamInterface* stream, 40 PreviewImageData* preview_image_data); 41 } // namespace piex 42 43 #endif // PIEX_PIEX_CR3_H_ 44