Reference documentation and code samples for the Google Cloud Document Ai V1 Client class LayoutImageBlock.
Represents an image type block.
Generated from protobuf message google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock
Namespace
Google \ Cloud \ DocumentAI \ V1 \ Document \ DocumentLayout \ DocumentLayoutBlockMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ blob_asset_id |
string
Optional. Asset id of the inline image. If set, find the image content in the blob_assets field. |
↳ gcs_uri |
string
Optional. Google Cloud Storage uri of the image. |
↳ data_uri |
string
Optional. Data uri of the image. It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[
|
↳ mime_type |
string
Mime type of the image. An IANA published media type (MIME type). |
↳ image_text |
string
Text extracted from the image using OCR or alt text describing the image. |
↳ annotations |
Google\Cloud\DocumentAI\V1\Document\Annotations
Annotation of the image block. |
getBlobAssetId
Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasBlobAssetId
setBlobAssetId
Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getGcsUri
Optional. Google Cloud Storage uri of the image.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasGcsUri
setGcsUri
Optional. Google Cloud Storage uri of the image.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDataUri
Optional. Data uri of the image.
It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[
| Returns | |
|---|---|
| Type | Description |
string |
|
hasDataUri
setDataUri
Optional. Data uri of the image.
It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMimeType
Mime type of the image. An IANA published media type (MIME type).
| Returns | |
|---|---|
| Type | Description |
string |
|
setMimeType
Mime type of the image. An IANA published media type (MIME type).
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getImageText
Text extracted from the image using OCR or alt text describing the image.
| Returns | |
|---|---|
| Type | Description |
string |
|
setImageText
Text extracted from the image using OCR or alt text describing the image.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAnnotations
Annotation of the image block.
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DocumentAI\V1\Document\Annotations|null |
|
hasAnnotations
clearAnnotations
setAnnotations
Annotation of the image block.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Cloud\DocumentAI\V1\Document\Annotations
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getImageSource
| Returns | |
|---|---|
| Type | Description |
string |
|