Commented a lot
This commit is contained in:
parent
94993a907f
commit
d7ccf6883c
6 changed files with 470 additions and 53 deletions
|
@ -2,41 +2,87 @@
|
|||
|
||||
public class Const
|
||||
{
|
||||
/**
|
||||
* Size of a chunk of data (used to split the ExtendedXMP information into blocks
|
||||
*/
|
||||
public static final int CHUNKSIZE = 65400;
|
||||
|
||||
/** Strings for JPEGUtils.decorate() */
|
||||
|
||||
public static final String EXIF = "EXIF";
|
||||
public static final String STANDARDXMP = "StandardXMP";
|
||||
public static final String EXTENDEDXMP = "ExtendedXMP";
|
||||
|
||||
public static byte[] markJPG = {(byte) 0xFF, (byte) 0xD8}; //FFD8
|
||||
/**
|
||||
* Magical bytes that identify the file as JPG (FF D8) (length: 2)
|
||||
*/
|
||||
public static byte[] markJPG = {(byte) 0xFF, (byte) 0xD8};
|
||||
|
||||
public static byte[] markAPP1 = {(byte) 0xFF, (byte) 0xE1}; //FFE1
|
||||
/**
|
||||
* Marker that defines the beginning of a new block of metadata (FF E1) (length: 2)
|
||||
*/
|
||||
public static byte[] markAPP1 = {(byte) 0xFF, (byte) 0xE1};
|
||||
|
||||
public static byte[] markEXIF = {(byte) 0x45, (byte) 0x78, (byte) 0x69, (byte) 0x66, (byte) 0x00, (byte) 0x00}; //EXIF\0\0
|
||||
/**
|
||||
* Header of the EXIF block (EXIF\0\0) (length: 6)
|
||||
*/
|
||||
public static byte[] markEXIF = {(byte) 0x45, (byte) 0x78, (byte) 0x69, (byte) 0x66, (byte) 0x00, (byte) 0x00};
|
||||
|
||||
public static byte[] markStandardXMP = { //Length: 29
|
||||
(byte) 0x68, (byte) 0x74, (byte) 0x74, (byte) 0x70, // http
|
||||
(byte) 0x3A, (byte) 0x2F, (byte) 0x2F, (byte) 0x6E, (byte) 0x73, // ://ns
|
||||
(byte) 0x2E, (byte) 0x61, (byte) 0x64, (byte) 0x6F, (byte) 0x62, // .adob
|
||||
(byte) 0x65, (byte) 0x2E, (byte) 0x63, (byte) 0x6F, (byte) 0x6D, // e.com
|
||||
(byte) 0x2F, (byte) 0x78, (byte) 0x61, (byte) 0x70, (byte) 0x2F, // /xap/
|
||||
(byte) 0x31, (byte) 0x2E, (byte) 0x30, (byte) 0x2F, (byte) 0x00}; // 1.0/\0
|
||||
/**
|
||||
* Header of the StandardXMP block (http://ns.adobe.com/xap/1.0/\0) (length: 29)
|
||||
*/
|
||||
public static byte[] markStandardXMP = {
|
||||
(byte) 0x68, (byte) 0x74, (byte) 0x74, (byte) 0x70,
|
||||
(byte) 0x3A, (byte) 0x2F, (byte) 0x2F, (byte) 0x6E, (byte) 0x73,
|
||||
(byte) 0x2E, (byte) 0x61, (byte) 0x64, (byte) 0x6F, (byte) 0x62,
|
||||
(byte) 0x65, (byte) 0x2E, (byte) 0x63, (byte) 0x6F, (byte) 0x6D,
|
||||
(byte) 0x2F, (byte) 0x78, (byte) 0x61, (byte) 0x70, (byte) 0x2F,
|
||||
(byte) 0x31, (byte) 0x2E, (byte) 0x30, (byte) 0x2F, (byte) 0x00};
|
||||
|
||||
public static byte[] markExtendedXMP = { //Length: 35
|
||||
(byte) 0x68, (byte) 0x74, (byte) 0x74, (byte) 0x70, // http
|
||||
(byte) 0x3A, (byte) 0x2F, (byte) 0x2F, (byte) 0x6E, (byte) 0x73, // ://ns
|
||||
(byte) 0x2E, (byte) 0x61, (byte) 0x64, (byte) 0x6F, (byte) 0x62, // .adob
|
||||
(byte) 0x65, (byte) 0x2E, (byte) 0x63, (byte) 0x6F, (byte) 0x6D, // e.com
|
||||
(byte) 0x2F, (byte) 0x78, (byte) 0x6D, (byte) 0x70, (byte) 0x2F, // /xmp/
|
||||
(byte) 0x65, (byte) 0x78, (byte) 0x74, (byte) 0x65, (byte) 0x6e, // exten
|
||||
(byte) 0x73, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2f, // sion/
|
||||
(byte) 0x00}; // \0
|
||||
/**
|
||||
* Header of the ExtendedXMP block (http://ns.adobe.com/xmp/extension/\0) (length: 35)
|
||||
*/
|
||||
public static byte[] markExtendedXMP = {
|
||||
(byte) 0x68, (byte) 0x74, (byte) 0x74, (byte) 0x70,
|
||||
(byte) 0x3A, (byte) 0x2F, (byte) 0x2F, (byte) 0x6E, (byte) 0x73,
|
||||
(byte) 0x2E, (byte) 0x61, (byte) 0x64, (byte) 0x6F, (byte) 0x62,
|
||||
(byte) 0x65, (byte) 0x2E, (byte) 0x63, (byte) 0x6F, (byte) 0x6D,
|
||||
(byte) 0x2F, (byte) 0x78, (byte) 0x6D, (byte) 0x70, (byte) 0x2F,
|
||||
(byte) 0x65, (byte) 0x78, (byte) 0x74, (byte) 0x65, (byte) 0x6e,
|
||||
(byte) 0x73, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2f,
|
||||
(byte) 0x00};
|
||||
|
||||
public static byte[] keyHasExtendedXMP = { //xmpNote:HasExtendedXMP
|
||||
0x78,0x6d,0x70,0x4e,0x6f,0x74,0x65,0x3a,0x48,0x61,0x73,0x45,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0x58,0x4d,0x50
|
||||
/** Keys (following scheme: key="value") */
|
||||
|
||||
/**
|
||||
* Key for the MD5 digest of the full ExtendedXMP block content (without headers etc.)
|
||||
* (xmpNote:HasExtendedXMP) (length: 22)
|
||||
*/
|
||||
public static byte[] keyHasExtendedXMP = {
|
||||
(byte) 0x78,(byte) 0x6d,(byte) 0x70,(byte) 0x4e,(byte) 0x6f,
|
||||
(byte) 0x74,(byte) 0x65,(byte) 0x3a,(byte) 0x48,(byte) 0x61,
|
||||
(byte) 0x73,(byte) 0x45,(byte) 0x78,(byte) 0x74,(byte) 0x65,
|
||||
(byte) 0x6e,(byte) 0x64,(byte) 0x65,(byte) 0x64,(byte) 0x58,
|
||||
(byte) 0x4d,(byte) 0x50
|
||||
};
|
||||
|
||||
public static byte[] keyGDepthData = {0x47,0x44,0x65,0x70,0x74,0x68,0x3a,0x44,0x61,0x74,0x61}; //GDepth:Data
|
||||
/**
|
||||
* Key for the Base64 encoded png image containing the depth information
|
||||
* (GDepth:Data) (length: 11)
|
||||
*/
|
||||
public static byte[] keyGDepthData = {
|
||||
(byte) 0x47,(byte) 0x44,(byte) 0x65,(byte) 0x70,(byte) 0x74,
|
||||
(byte) 0x68,(byte) 0x3a,(byte) 0x44,(byte) 0x61,(byte) 0x74,
|
||||
(byte) 0x61
|
||||
};
|
||||
|
||||
public static byte[] keyGImageData = {0x47,0x49,0x6d,0x61,0x67,0x65,0x3a,0x44,0x61,0x74,0x61}; //GImage:Data
|
||||
/**
|
||||
* Key for the Base64 encoded unblurred jpg source image (Google camera will combine this with the depth information to render the blurred image)
|
||||
* (GImage:Data) (length: 11)
|
||||
*/
|
||||
public static byte[] keyGImageData = {
|
||||
(byte) 0x47,(byte) 0x49,(byte) 0x6d,(byte) 0x61,(byte) 0x67,
|
||||
(byte) 0x65,(byte) 0x3a,(byte) 0x44,(byte) 0x61,(byte) 0x74,
|
||||
(byte) 0x61
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue