Home | History | Annotate | Download | only in codec
      1 /*
      2  * Copyright 2017 Google Inc.
      3  *
      4  * Use of this source code is governed by a BSD-style license that can be
      5  * found in the LICENSE file.
      6  */
      7 
      8 
      9 #ifndef SkJpegPriv_DEFINED
     10 #define SkJpegPriv_DEFINED
     11 
     12 #include "SkStream.h"
     13 
     14 #include <setjmp.h>
     15 // stdio is needed for jpeglib
     16 #include <stdio.h>
     17 
     18 extern "C" {
     19     #include "jpeglib.h"
     20     #include "jerror.h"
     21 }
     22 
     23 static constexpr uint32_t kICCMarker = JPEG_APP0 + 2;
     24 static constexpr uint32_t kICCMarkerHeaderSize = 14;
     25 static constexpr uint8_t kICCSig[] = {
     26         'I', 'C', 'C', '_', 'P', 'R', 'O', 'F', 'I', 'L', 'E', '\0',
     27 };
     28 
     29 /*
     30  * Error handling struct
     31  */
     32 struct skjpeg_error_mgr : jpeg_error_mgr {
     33     jmp_buf fJmpBuf;
     34 };
     35 
     36 #endif
     37