blob: e4e5b12763970e67f52d3a05b14c563256fe145c [file] [log] [blame]
Matt Sarett4ef01482017-03-22 12:53:27 -04001/*
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
18extern "C" {
19 #include "jpeglib.h"
20 #include "jerror.h"
21}
22
23static constexpr uint32_t kICCMarker = JPEG_APP0 + 2;
24static constexpr uint32_t kICCMarkerHeaderSize = 14;
25static constexpr uint8_t kICCSig[] = {
26 'I', 'C', 'C', '_', 'P', 'R', 'O', 'F', 'I', 'L', 'E', '\0',
27};
28
29/*
30 * Error handling struct
31 */
32struct skjpeg_error_mgr : jpeg_error_mgr {
33 jmp_buf fJmpBuf;
34};
35
36#endif