Skip to content

Commit 508696a

Browse files
kristineguocgdecker
authored andcommitted
Add MediaType for "image/heif" and "image/jp2"
RELNOTES=Add MediaType for "image/heif" and "image/jp2" ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=260960132
1 parent ff9057f commit 508696a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

android/guava/src/com/google/common/net/MediaType.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,20 @@ private static MediaType addKnownType(MediaType mediaType) {
242242
*/
243243
public static final MediaType WEBP = createConstant(IMAGE_TYPE, "webp");
244244

245+
/**
246+
* <a href="https://www.iana.org/assignments/media-types/image/heif">HEIF image format</a>.
247+
*
248+
* @since NEXT
249+
*/
250+
public static final MediaType HEIF = createConstant(IMAGE_TYPE, "heif");
251+
252+
/**
253+
* <a href="https://tools.ietf.org/html/rfc3745">JP2K image format</a>.
254+
*
255+
* @since NEXT
256+
*/
257+
public static final MediaType JP2K = createConstant(IMAGE_TYPE, "jp2");
258+
245259
/* audio types */
246260
public static final MediaType MP4_AUDIO = createConstant(AUDIO_TYPE, "mp4");
247261
public static final MediaType MPEG_AUDIO = createConstant(AUDIO_TYPE, "mpeg");

guava/src/com/google/common/net/MediaType.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,20 @@ private static MediaType addKnownType(MediaType mediaType) {
242242
*/
243243
public static final MediaType WEBP = createConstant(IMAGE_TYPE, "webp");
244244

245+
/**
246+
* <a href="https://www.iana.org/assignments/media-types/image/heif">HEIF image format</a>.
247+
*
248+
* @since NEXT
249+
*/
250+
public static final MediaType HEIF = createConstant(IMAGE_TYPE, "heif");
251+
252+
/**
253+
* <a href="https://tools.ietf.org/html/rfc3745">JP2K image format</a>.
254+
*
255+
* @since NEXT
256+
*/
257+
public static final MediaType JP2K = createConstant(IMAGE_TYPE, "jp2");
258+
245259
/* audio types */
246260
public static final MediaType MP4_AUDIO = createConstant(AUDIO_TYPE, "mp4");
247261
public static final MediaType MPEG_AUDIO = createConstant(AUDIO_TYPE, "mpeg");

0 commit comments

Comments
 (0)