Class Image (3.74.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version latestkeyboard_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.v1p1beta1.Image
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT) 
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int) 
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Fields
   
  CONTENT_FIELD_NUMBER 
  
    
public   static   final   int   CONTENT_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  SOURCE_FIELD_NUMBER 
  
    
public   static   final   int   SOURCE_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  Static Methods
   
  getDefaultInstance() 
  
    
public   static   Image   getDefaultInstance ()  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  newBuilder() 
  
    
public   static   Image . Builder   newBuilder ()  
  
  newBuilder(Image prototype) 
  
    
public   static   Image . Builder   newBuilder ( Image   prototype )  
  
    
      
        Parameter  
      
        Name Description  
      
        prototypeImage  
     
  
  
  
    
public   static   Image   parseDelimitedFrom ( InputStream   input )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  
    
public   static   Image   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  parseFrom(byte[] data) 
  
    
public   static   Image   parseFrom ( byte []   data )  
  
    
      
        Parameter  
      
        Name Description  
      
        databyte [] 
     
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Image   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  parseFrom(ByteString data) 
  
    
public   static   Image   parseFrom ( ByteString   data )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Image   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  
    
public   static   Image   parseFrom ( CodedInputStream   input )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  
    
public   static   Image   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  
    
public   static   Image   parseFrom ( InputStream   input )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  
    
public   static   Image   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  parseFrom(ByteBuffer data) 
  
    
public   static   Image   parseFrom ( ByteBuffer   data )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Image   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  
  parser() 
  
    
public   static   Parser<Image>   parser ()  
  
  Methods
   
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
  
    
      
        Parameter  
      
        Name Description  
      
        objObject  
     
  
  
  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.
 bytes content = 1;
getDefaultInstanceForType() 
  
    
public   Image   getDefaultInstanceForType ()  
  
    
      
        Returns  
      
        Type Description  
      
        Image  
     
  
  getParserForType() 
  
    
public   Parser<Image>   getParserForType ()  
  
  Overrides 
  
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  getSource() 
  
    
public   ImageSource   getSource ()  
   Google Cloud Storage image location. 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.v1p1beta1.ImageSource source = 2;
getSourceOrBuilder() 
  
    
public   ImageSourceOrBuilder   getSourceOrBuilder ()  
   Google Cloud Storage image location. 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.v1p1beta1.ImageSource source = 2;
hasSource() 
  
    
public   boolean   hasSource ()  
   Google Cloud Storage image location. 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.v1p1beta1.ImageSource source = 2;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the source field is set.
 
     
  
  hashCode() 
  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  newBuilderForType() 
  
    
public   Image . Builder   newBuilderForType ()  
  
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   Image . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  
  
  Overrides 
  
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Object  
     
  
  Overrides 
  
  toBuilder() 
  
    
public   Image . Builder   toBuilder ()  
  
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
  
  Overrides 
  
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  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-10-29 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]