public class DbxThumbnailFormat extends Object
DbxClient.getThumbnail(com.dropbox.core.DbxThumbnailSize, com.dropbox.core.DbxThumbnailFormat, java.lang.String, java.lang.String, java.io.OutputStream)
.Modifier and Type | Field and Description |
---|---|
String |
ident |
static DbxThumbnailFormat |
JPEG
JPEG format, preferred over PNG for photographic images.
|
static DbxThumbnailFormat |
PNG
PNG format, preferred over JPEG for non-photographic images, such as
screenshots and digital art.
|
Constructor and Description |
---|
DbxThumbnailFormat(String ident) |
Modifier and Type | Method and Description |
---|---|
static DbxThumbnailFormat |
bestForFileName(String fileName,
DbxThumbnailFormat fallback)
Try and guess the right
DbxThumbnailFormat to use based on the image's file
name. |
public final String ident
public static final DbxThumbnailFormat JPEG
public static final DbxThumbnailFormat PNG
public DbxThumbnailFormat(String ident)
public static DbxThumbnailFormat bestForFileName(String fileName, DbxThumbnailFormat fallback)
DbxThumbnailFormat
to use based on the image's file
name. Sometimes this function won't be able to guess and will just return whatever you
pass in for fallback
.
DbxThumbnailFormat.bestForFileName("test.png"); // returns DbxThumbnailFormat.PNG DbxThumbnailFormat.bestForFileName("/stuff/funny.GIF"); // returns DbxThumbnailFormat.PNG DbxThumbnailFormat.bestForFileName("/family.jpg"); // returns DbxThumbnailFormat.JPEG
Copyright © 2014. All rights reserved.