diff options
author | ztenghui <ztenghui@google.com> | 2013-08-23 11:47:56 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2013-08-28 13:07:45 -0700 |
commit | a16e7b50f3148f581439509279f242092e254309 (patch) | |
tree | aa5ba2660ad79635b4f3d4a14691c7ebeac907d7 /src/com/android/camera/exif/JpegHeader.java | |
parent | 7446e9fde7cd8dd7904beff592e8819513797ab9 (diff) | |
download | android_packages_apps_Snap-a16e7b50f3148f581439509279f242092e254309.tar.gz android_packages_apps_Snap-a16e7b50f3148f581439509279f242092e254309.tar.bz2 android_packages_apps_Snap-a16e7b50f3148f581439509279f242092e254309.zip |
Add rotate support in Film Strip
Move the exif related code under src.com.android.camera.exif.
Refactor the member variables under LocalMediaData.java.
Refactor the LocalData to make sure they are immutables for thread safety.
bug:10367037
Change-Id: I0e84bcc0097925b2be749fe016984177a68e0a4d
Diffstat (limited to 'src/com/android/camera/exif/JpegHeader.java')
-rw-r--r-- | src/com/android/camera/exif/JpegHeader.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/com/android/camera/exif/JpegHeader.java b/src/com/android/camera/exif/JpegHeader.java new file mode 100644 index 000000000..383617af4 --- /dev/null +++ b/src/com/android/camera/exif/JpegHeader.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.camera.exif; + +class JpegHeader { + public static final short SOI = (short) 0xFFD8; + public static final short APP1 = (short) 0xFFE1; + public static final short APP0 = (short) 0xFFE0; + public static final short EOI = (short) 0xFFD9; + + /** + * SOF (start of frame). All value between SOF0 and SOF15 is SOF marker except for DHT, JPG, + * and DAC marker. + */ + public static final short SOF0 = (short) 0xFFC0; + public static final short SOF15 = (short) 0xFFCF; + public static final short DHT = (short) 0xFFC4; + public static final short JPG = (short) 0xFFC8; + public static final short DAC = (short) 0xFFCC; + + public static final boolean isSofMarker(short marker) { + return marker >= SOF0 && marker <= SOF15 && marker != DHT && marker != JPG + && marker != DAC; + } +} |