1*4d671364SKiyoung Kim // Copyright 2020 Google Inc. 2*4d671364SKiyoung Kim // 3*4d671364SKiyoung Kim // Licensed under the Apache License, Version 2.0 (the "License"); 4*4d671364SKiyoung Kim // you may not use this file except in compliance with the License. 5*4d671364SKiyoung Kim // You may obtain a copy of the License at 6*4d671364SKiyoung Kim // 7*4d671364SKiyoung Kim // http://www.apache.org/licenses/LICENSE-2.0 8*4d671364SKiyoung Kim // 9*4d671364SKiyoung Kim // Unless required by applicable law or agreed to in writing, software 10*4d671364SKiyoung Kim // distributed under the License is distributed on an "AS IS" BASIS, 11*4d671364SKiyoung Kim // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*4d671364SKiyoung Kim // See the License for the specific language governing permissions and 13*4d671364SKiyoung Kim // limitations under the License. 14*4d671364SKiyoung Kim // 15*4d671364SKiyoung Kim //////////////////////////////////////////////////////////////////////////////// 16*4d671364SKiyoung Kim 17*4d671364SKiyoung Kim #include "src/piex_types.h" 18*4d671364SKiyoung Kim 19*4d671364SKiyoung Kim #ifndef PIEX_PIEX_CR3_H_ 20*4d671364SKiyoung Kim #define PIEX_PIEX_CR3_H_ 21*4d671364SKiyoung Kim 22*4d671364SKiyoung Kim namespace piex { 23*4d671364SKiyoung Kim 24*4d671364SKiyoung Kim // Gets the EXIF orientation of a CR3 stream, returning true on success. 25*4d671364SKiyoung Kim bool Cr3GetOrientation(StreamInterface* stream, std::uint32_t* orientation); 26*4d671364SKiyoung Kim 27*4d671364SKiyoung Kim // Gets preview images of a CR3 stream, returning kOk on success. Assumes the 28*4d671364SKiyoung Kim // stream is a CR3 stream. 29*4d671364SKiyoung Kim // 30*4d671364SKiyoung Kim // Canon's CR3 is based on ISO/IEC 14496-12: ISO base media file format. (CR2 is 31*4d671364SKiyoung Kim // TIFF based.) A Canon CR3 contains multiple embedded images. Most cameras 32*4d671364SKiyoung Kim // output CR3 files that contain a full-size JPEG, a 1620x1080 preview JPEG, and 33*4d671364SKiyoung Kim // a 160x120 thumbnail JPEG. 34*4d671364SKiyoung Kim // The Canon EOS 1D X Mark III, though, contains a full-size HEVC image, a 35*4d671364SKiyoung Kim // 1620x1080 preview JPEG, and a 160x120 thumbnail JPEG. 36*4d671364SKiyoung Kim // Until support for HEVC is added, this method returns the largest embedded 37*4d671364SKiyoung Kim // JPEG in preview_image_data->preview. 38*4d671364SKiyoung Kim // 39*4d671364SKiyoung Kim Error Cr3GetPreviewData(StreamInterface* stream, 40*4d671364SKiyoung Kim PreviewImageData* preview_image_data); 41*4d671364SKiyoung Kim } // namespace piex 42*4d671364SKiyoung Kim 43*4d671364SKiyoung Kim #endif // PIEX_PIEX_CR3_H_ 44