Send feedback
Class Image (3.2.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.2.0 keyboard_arrow_down
public final class Image extends GeneratedMessageV3 implements ImageOrBuilder
Client image to perform Google Cloud Vision API tasks over.
Protobuf type google.cloud.vision.v1.Image
Static Fields
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
Field Value
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Image getDefaultInstance ()
Returns
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
newBuilder()
public static Image . Builder newBuilder ()
Returns
newBuilder(Image prototype)
public static Image . Builder newBuilder ( Image prototype )
Parameter
Name Description prototype Image
Returns
public static Image parseDelimitedFrom ( InputStream input )
Parameter
Returns
Exceptions
public static Image parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Image parseFrom ( byte [] data )
Parameter
Name Description data byte []
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Image parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Image parseFrom ( ByteString data )
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Image parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static Image parseFrom ( CodedInputStream input )
Parameter
Returns
Exceptions
public static Image parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static Image parseFrom ( InputStream input )
Parameter
Returns
Exceptions
public static Image parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Image parseFrom ( ByteBuffer data )
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Image parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parser()
public static Parser<Image> parser ()
Returns
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Returns
Overrides
getContent()
public ByteString getContent ()
Image content, represented as a stream of bytes.
Note: As with all bytes
fields, protobuffers use a pure binary
representation, whereas JSON representations use base64.
Currently, this field only works for BatchAnnotateImages requests. It does
not work for AsyncBatchAnnotateImages requests.
bytes content = 1;
Returns
getDefaultInstanceForType()
public Image getDefaultInstanceForType ()
Returns
getParserForType()
public Parser<Image> getParserForType ()
Returns
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Overrides
getSource()
public ImageSource getSource ()
Google Cloud Storage image location, or publicly-accessible image
URL. If both content
and source
are provided for an image, content
takes precedence and is used to perform the image annotation request.
.google.cloud.vision.v1.ImageSource source = 2;
Returns
getSourceOrBuilder()
public ImageSourceOrBuilder getSourceOrBuilder ()
Google Cloud Storage image location, or publicly-accessible image
URL. If both content
and source
are provided for an image, content
takes precedence and is used to perform the image annotation request.
.google.cloud.vision.v1.ImageSource source = 2;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields ()
Returns
Overrides
hasSource()
public boolean hasSource ()
Google Cloud Storage image location, or publicly-accessible image
URL. If both content
and source
are provided for an image, content
takes precedence and is used to perform the image annotation request.
.google.cloud.vision.v1.ImageSource source = 2;
Returns
Type Description boolean Whether the source field is set.
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
newBuilderForType()
public Image . Builder newBuilderForType ()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Image . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Parameter
Returns
Overrides
toBuilder()
public Image . Builder toBuilder ()
Returns
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Parameter
Overrides
Exceptions
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-04 UTC."],[],[]]