Skip to content

Commit

Permalink
add bmp, webp image mime types
Browse files Browse the repository at this point in the history
  • Loading branch information
gejiaheng committed Apr 24, 2017
1 parent ef2ac6b commit f06abc3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion matisse/src/main/java/com/zhihu/matisse/MimeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@
import java.util.Set;

/**
* MIME Type enumeration to restrict selectable media on the selection activity.
* MIME Type enumeration to restrict selectable media on the selection activity. Matisse only supports images and videos.
*
* Good example of mime types Android supports:
* https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/MediaFile.java
*/
@SuppressWarnings("unused")
public enum MimeType {
// ============== images ==============
JPEG("image/jpeg", new HashSet<String>() {{
add("jpg");
add("jpeg");
Expand All @@ -42,6 +46,14 @@ public enum MimeType {
GIF("image/gif", new HashSet<String>() {{
add("gif");
}}),
BMP("image/x-ms-bmp", new HashSet<String>() {{
add("bmp");
}}),
WEBP("image/webp", new HashSet<String>() {{
add("webp");
}}),

// ============== videos ==============
MPEG("video/mpeg", new HashSet<String>() {{
add("mpeg");
add("mpg");
Expand Down

0 comments on commit f06abc3

Please sign in to comment.