Modifier and Type | Class and Description |
---|---|
static class |
ImageContent.DetailLevel
The detail level of an
Image . |
Constructor and Description |
---|
ImageContent(Image image)
Create a new
ImageContent from the given image. |
ImageContent(Image image,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given image. |
ImageContent(String url)
Create a new
ImageContent from the given url. |
ImageContent(String url,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given url and detail level. |
ImageContent(String base64Data,
String mimeType)
Create a new
ImageContent from the given base64 data and mime type. |
ImageContent(String base64Data,
String mimeType,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given base64 data and mime type. |
ImageContent(URI url)
Create a new
ImageContent from the given url. |
ImageContent(URI url,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given url and detail level. |
Modifier and Type | Method and Description |
---|---|
ImageContent.DetailLevel |
detailLevel()
Get the
DetailLevel . |
boolean |
equals(Object o) |
static ImageContent |
from(Image image)
Create a new
ImageContent from the given image. |
static ImageContent |
from(Image image,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given image. |
static ImageContent |
from(String url)
Create a new
ImageContent from the given url. |
static ImageContent |
from(String url,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given url and detail level. |
static ImageContent |
from(String base64Data,
String mimeType)
Create a new
ImageContent from the given base64 data and mime type. |
static ImageContent |
from(String base64Data,
String mimeType,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given base64 data and mime type. |
static ImageContent |
from(URI url)
Create a new
ImageContent from the given url. |
static ImageContent |
from(URI url,
ImageContent.DetailLevel detailLevel)
Create a new
ImageContent from the given url and detail level. |
int |
hashCode() |
Image |
image()
Get the
Image . |
String |
toString() |
ContentType |
type()
Returns the type of content.
|
public ImageContent(URI url)
ImageContent
from the given url.
The image will be created with DetailLevel.LOW
detail.
url
- the url of the image.public ImageContent(String url)
ImageContent
from the given url.
The image will be created with DetailLevel.LOW
detail.
url
- the url of the image.public ImageContent(URI url, ImageContent.DetailLevel detailLevel)
ImageContent
from the given url and detail level.url
- the url of the image.detailLevel
- the detail level of the image.public ImageContent(String url, ImageContent.DetailLevel detailLevel)
ImageContent
from the given url and detail level.url
- the url of the image.detailLevel
- the detail level of the image.public ImageContent(String base64Data, String mimeType)
ImageContent
from the given base64 data and mime type.
The image will be created with DetailLevel.LOW
detail.
base64Data
- the base64 data of the image.mimeType
- the mime type of the image.public ImageContent(String base64Data, String mimeType, ImageContent.DetailLevel detailLevel)
ImageContent
from the given base64 data and mime type.base64Data
- the base64 data of the image.mimeType
- the mime type of the image.detailLevel
- the detail level of the image.public ImageContent(Image image)
ImageContent
from the given image.
The image will be created with DetailLevel.LOW
detail.
image
- the image.public ImageContent(Image image, ImageContent.DetailLevel detailLevel)
ImageContent
from the given image.image
- the image.detailLevel
- the detail level of the image.public Image image()
Image
.Image
.public ImageContent.DetailLevel detailLevel()
DetailLevel
.DetailLevel
.public ContentType type()
Content
Can be used to cast the content to the correct type.
public static ImageContent from(URI url)
ImageContent
from the given url.
The image will be created with DetailLevel.LOW
detail.
url
- the url of the image.ImageContent
.public static ImageContent from(String url)
ImageContent
from the given url.
The image will be created with DetailLevel.LOW
detail.
url
- the url of the image.ImageContent
.public static ImageContent from(URI url, ImageContent.DetailLevel detailLevel)
ImageContent
from the given url and detail level.url
- the url of the image.detailLevel
- the detail level of the image.ImageContent
.public static ImageContent from(String url, ImageContent.DetailLevel detailLevel)
ImageContent
from the given url and detail level.url
- the url of the image.detailLevel
- the detail level of the image.ImageContent
.public static ImageContent from(String base64Data, String mimeType)
ImageContent
from the given base64 data and mime type.
The image will be created with DetailLevel.LOW
detail.
base64Data
- the base64 data of the image.mimeType
- the mime type of the image.ImageContent
.public static ImageContent from(String base64Data, String mimeType, ImageContent.DetailLevel detailLevel)
ImageContent
from the given base64 data and mime type.base64Data
- the base64 data of the image.mimeType
- the mime type of the image.detailLevel
- the detail level of the image.ImageContent
.public static ImageContent from(Image image)
ImageContent
from the given image.
The image will be created with DetailLevel.LOW
detail.
image
- the image.ImageContent
.public static ImageContent from(Image image, ImageContent.DetailLevel detailLevel)
ImageContent
from the given image.image
- the image.detailLevel
- the detail level of the image.ImageContent
.Copyright © 2024. All rights reserved.