Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: src/pdf/SkJpegInfo.h

Issue 1133443003: SkPDF: detect YUV-JPEG without relying on ImageGenerator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/pdf.gypi ('k') | src/pdf/SkJpegInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkJpegInfo.h
diff --git a/src/pdf/SkJpegInfo.h b/src/pdf/SkJpegInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..1be4c0fa669ba79f852882375156584fa62949fe
--- /dev/null
+++ b/src/pdf/SkJpegInfo.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkJpegInfo_DEFINED
+#define SkJpegInfo_DEFINED
+
+class SkData;
+
+struct SkJFIFInfo {
+ int fWidth;
+ int fHeight;
+ enum Type {
+ kGrayscale,
+ kYCbCr,
+ } fType;
+};
+
+/** Returns true iff the data seems to be a valid JFIF JPEG image.
+ If so and if info is not NULL, populate info.
+
+ JPEG/JFIF References:
+ http://www.w3.org/Graphics/JPEG/itu-t81.pdf
+ http://www.w3.org/Graphics/JPEG/jfif3.pdf
+*/
+bool SkIsJFIF(const SkData* skdata, SkJFIFInfo* info);
+
+#endif // SkJpegInfo_DEFINED
« no previous file with comments | « gyp/pdf.gypi ('k') | src/pdf/SkJpegInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698