class CloudmersiveImageRecognitionApiClient::EditApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

edit_auto_orient(image_file, opts = {}) click to toggle source

Normalizes image rotation and removes EXIF rotation data Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 27
def edit_auto_orient(image_file, opts = {})
  data, _status_code, _headers = edit_auto_orient_with_http_info(image_file, opts)
  data
end
edit_auto_orient_with_http_info(image_file, opts = {}) click to toggle source

Normalizes image rotation and removes EXIF rotation data Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 37
def edit_auto_orient_with_http_info(image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_auto_orient ...'
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_auto_orient"
  end
  # resource path
  local_var_path = '/image/edit/auto-orient/remove-exif'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_auto_orient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_composite_basic(location, base_image, layered_image, opts = {}) click to toggle source

Composite two images together Composites two input images together; a layered image onto a base image. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. @param location Location to composite the layered images; possible values are: "center&quot;, "top-left&quot;, "top-center&quot;, "top-right&quot;, "center-left&quot;, "center-right&quot;, "bottom-left&quot;, "bottom-center&quot;, "bottom-right&quot; @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param layered_image Image to layer on top of the base image. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 84
def edit_composite_basic(location, base_image, layered_image, opts = {})
  data, _status_code, _headers = edit_composite_basic_with_http_info(location, base_image, layered_image, opts)
  data
end
edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {}) click to toggle source

Composite two images together Composites two input images together; a layered image onto a base image. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. @param location Location to composite the layered images; possible values are: "center&quot;, "top-left&quot;, "top-center&quot;, "top-right&quot;, "center-left&quot;, "center-right&quot;, "bottom-left&quot;, "bottom-center&quot;, "bottom-right&quot; @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param layered_image Image to layer on top of the base image. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 96
def edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_composite_basic ...'
  end
  # verify the required parameter 'location' is set
  if @api_client.config.client_side_validation && location.nil?
    fail ArgumentError, "Missing the required parameter 'location' when calling EditApi.edit_composite_basic"
  end
  # verify the required parameter 'base_image' is set
  if @api_client.config.client_side_validation && base_image.nil?
    fail ArgumentError, "Missing the required parameter 'base_image' when calling EditApi.edit_composite_basic"
  end
  # verify the required parameter 'layered_image' is set
  if @api_client.config.client_side_validation && layered_image.nil?
    fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_basic"
  end
  # resource path
  local_var_path = '/image/edit/composite/{location}'.sub('{' + 'location' + '}', location.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['baseImage'] = base_image
  form_params['layeredImage'] = layered_image

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_composite_basic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_composite_precise(base_image, layered_image, opts = {}) click to toggle source

Composite two images together precisely Composites two input images together; a layered image onto a base image. Position is based on distance in pixels from each side. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. Providing multiple parameters in a single axis (for example top and bottom) is not recommended, since only one of the parameters will be used per axis. @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param layered_image Image to layer on top of the base image. @param [Hash] opts the optional parameters @option opts [Integer] :top Optional; Desired distance in pixels from the top of the base image to the top of the layered image. @option opts [Integer] :bottom Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image. @option opts [Integer] :left Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image. @option opts [Integer] :right Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image. @option opts [Integer] :width Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally. @option opts [Integer] :height Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally. @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 157
def edit_composite_precise(base_image, layered_image, opts = {})
  data, _status_code, _headers = edit_composite_precise_with_http_info(base_image, layered_image, opts)
  data
end
edit_composite_precise_with_http_info(base_image, layered_image, opts = {}) click to toggle source

Composite two images together precisely Composites two input images together; a layered image onto a base image. Position is based on distance in pixels from each side. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. Providing multiple parameters in a single axis (for example top and bottom) is not recommended, since only one of the parameters will be used per axis. @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param layered_image Image to layer on top of the base image. @param [Hash] opts the optional parameters @option opts [Integer] :top Optional; Desired distance in pixels from the top of the base image to the top of the layered image. @option opts [Integer] :bottom Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image. @option opts [Integer] :left Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image. @option opts [Integer] :right Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image. @option opts [Integer] :width Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally. @option opts [Integer] :height Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally. @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 174
def edit_composite_precise_with_http_info(base_image, layered_image, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_composite_precise ...'
  end
  # verify the required parameter 'base_image' is set
  if @api_client.config.client_side_validation && base_image.nil?
    fail ArgumentError, "Missing the required parameter 'base_image' when calling EditApi.edit_composite_precise"
  end
  # verify the required parameter 'layered_image' is set
  if @api_client.config.client_side_validation && layered_image.nil?
    fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_precise"
  end
  # resource path
  local_var_path = '/image/edit/composite/precise'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'top'] = opts[:'top'] if !opts[:'top'].nil?
  header_params[:'bottom'] = opts[:'bottom'] if !opts[:'bottom'].nil?
  header_params[:'left'] = opts[:'left'] if !opts[:'left'].nil?
  header_params[:'right'] = opts[:'right'] if !opts[:'right'].nil?
  header_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  header_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?

  # form parameters
  form_params = {}
  form_params['baseImage'] = base_image
  form_params['layeredImage'] = layered_image

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_composite_precise\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_contrast_adaptive(gamma, image_file, opts = {}) click to toggle source

Adaptively adjust the contrast of the image to be more appealing and easy to see Uses Gamma to adjust the contrast adaptively the way the human eye sees the world. Results significantly improve the viewability and visual appeal of the image. @param gamma Gamma value to adjust the contrast in the image. Recommended value is 2.0. Values between 0.0 and 1.0 will reduce contrast, while values above 1.0 will increase contrast. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 231
def edit_contrast_adaptive(gamma, image_file, opts = {})
  data, _status_code, _headers = edit_contrast_adaptive_with_http_info(gamma, image_file, opts)
  data
end
edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {}) click to toggle source

Adaptively adjust the contrast of the image to be more appealing and easy to see Uses Gamma to adjust the contrast adaptively the way the human eye sees the world. Results significantly improve the viewability and visual appeal of the image. @param gamma Gamma value to adjust the contrast in the image. Recommended value is 2.0. Values between 0.0 and 1.0 will reduce contrast, while values above 1.0 will increase contrast. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 242
def edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_contrast_adaptive ...'
  end
  # verify the required parameter 'gamma' is set
  if @api_client.config.client_side_validation && gamma.nil?
    fail ArgumentError, "Missing the required parameter 'gamma' when calling EditApi.edit_contrast_adaptive"
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_contrast_adaptive"
  end
  # resource path
  local_var_path = '/image/edit/contrast/{gamma}/adaptive'.sub('{' + 'gamma' + '}', gamma.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_contrast_adaptive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_crop_circle(left, top, radius, image_file, opts = {}) click to toggle source

Crop an image to an circular area Crop an image to a target circular area @param left The left edge of the circular crop area in pixels (X). @param top The top edge of the circular crop area in pixels (Y). @param radius The radius of the circular crop area in pixels. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 294
def edit_crop_circle(left, top, radius, image_file, opts = {})
  data, _status_code, _headers = edit_crop_circle_with_http_info(left, top, radius, image_file, opts)
  data
end
edit_crop_circle_with_http_info(left, top, radius, image_file, opts = {}) click to toggle source

Crop an image to an circular area Crop an image to a target circular area @param left The left edge of the circular crop area in pixels (X). @param top The top edge of the circular crop area in pixels (Y). @param radius The radius of the circular crop area in pixels. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 307
def edit_crop_circle_with_http_info(left, top, radius, image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_crop_circle ...'
  end
  # verify the required parameter 'left' is set
  if @api_client.config.client_side_validation && left.nil?
    fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_circle"
  end
  # verify the required parameter 'top' is set
  if @api_client.config.client_side_validation && top.nil?
    fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_circle"
  end
  # verify the required parameter 'radius' is set
  if @api_client.config.client_side_validation && radius.nil?
    fail ArgumentError, "Missing the required parameter 'radius' when calling EditApi.edit_crop_circle"
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_circle"
  end
  # resource path
  local_var_path = '/image/edit/crop/circle/{left}/{top}/{radius}'.sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'radius' + '}', radius.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_crop_circle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_crop_rectangle(left, top, width, height, image_file, opts = {}) click to toggle source

Crop an image to a rectangular area Crop an image to a target rectangular area @param left The left edge of the rectangular crop area in pixels (X). @param top The top edge of the rectangular crop area in pixels (Y). @param width The width of the rectangular crop area in pixels. @param height The height of the rectangular crop area in pixels. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 368
def edit_crop_rectangle(left, top, width, height, image_file, opts = {})
  data, _status_code, _headers = edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts)
  data
end
edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {}) click to toggle source

Crop an image to a rectangular area Crop an image to a target rectangular area @param left The left edge of the rectangular crop area in pixels (X). @param top The top edge of the rectangular crop area in pixels (Y). @param width The width of the rectangular crop area in pixels. @param height The height of the rectangular crop area in pixels. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 382
def edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_crop_rectangle ...'
  end
  # verify the required parameter 'left' is set
  if @api_client.config.client_side_validation && left.nil?
    fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_rectangle"
  end
  # verify the required parameter 'top' is set
  if @api_client.config.client_side_validation && top.nil?
    fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_rectangle"
  end
  # verify the required parameter 'width' is set
  if @api_client.config.client_side_validation && width.nil?
    fail ArgumentError, "Missing the required parameter 'width' when calling EditApi.edit_crop_rectangle"
  end
  # verify the required parameter 'height' is set
  if @api_client.config.client_side_validation && height.nil?
    fail ArgumentError, "Missing the required parameter 'height' when calling EditApi.edit_crop_rectangle"
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_rectangle"
  end
  # resource path
  local_var_path = '/image/edit/crop/rectangle/{left}/{top}/{width}/{height}'.sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'width' + '}', width.to_s).sub('{' + 'height' + '}', height.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_crop_rectangle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_draw_polygon(request, opts = {}) click to toggle source

Draw a polygon onto an image Draw one or more polygons, with customized visuals, onto an image @param request Polygon drawing request parameters @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 443
def edit_draw_polygon(request, opts = {})
  data, _status_code, _headers = edit_draw_polygon_with_http_info(request, opts)
  data
end
edit_draw_polygon_with_http_info(request, opts = {}) click to toggle source

Draw a polygon onto an image Draw one or more polygons, with customized visuals, onto an image @param request Polygon drawing request parameters @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 453
def edit_draw_polygon_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_polygon ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_polygon"
  end
  # resource path
  local_var_path = '/image/edit/draw/polygon'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_draw_polygon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_draw_rectangle(request, opts = {}) click to toggle source

Draw a rectangle onto an image Draw one or more rectangles, with customized visuals, onto an image @param request Draw rectangle parameters @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 497
def edit_draw_rectangle(request, opts = {})
  data, _status_code, _headers = edit_draw_rectangle_with_http_info(request, opts)
  data
end
edit_draw_rectangle_with_http_info(request, opts = {}) click to toggle source

Draw a rectangle onto an image Draw one or more rectangles, with customized visuals, onto an image @param request Draw rectangle parameters @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 507
def edit_draw_rectangle_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_rectangle ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_rectangle"
  end
  # resource path
  local_var_path = '/image/edit/draw/rectangle'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_draw_rectangle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_draw_text(request, opts = {}) click to toggle source

Draw text onto an image Draw one or more pieces of text, with customized visuals, onto an image @param request Draw text parameters @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 551
def edit_draw_text(request, opts = {})
  data, _status_code, _headers = edit_draw_text_with_http_info(request, opts)
  data
end
edit_draw_text_with_http_info(request, opts = {}) click to toggle source

Draw text onto an image Draw one or more pieces of text, with customized visuals, onto an image @param request Draw text parameters @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 561
def edit_draw_text_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_text ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_text"
  end
  # resource path
  local_var_path = '/image/edit/draw/text'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_draw_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {}) click to toggle source

Add a customizeable drop shadow to an image Add a customizeable drop shadow to the image @param x Horizontal (X) offset of the drop shadow @param y Vertical (Y) offset of the drop shadow @param sigma Sigma (blur distance) of the drop shadow @param opacity Opacity of the drop shadow; 0 is 0% and 100 is 100% @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 609
def edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {})
  data, _status_code, _headers = edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts)
  data
end
edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {}) click to toggle source

Add a customizeable drop shadow to an image Add a customizeable drop shadow to the image @param x Horizontal (X) offset of the drop shadow @param y Vertical (Y) offset of the drop shadow @param sigma Sigma (blur distance) of the drop shadow @param opacity Opacity of the drop shadow; 0 is 0% and 100 is 100% @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 623
def edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_drop_shadow ...'
  end
  # verify the required parameter 'x' is set
  if @api_client.config.client_side_validation && x.nil?
    fail ArgumentError, "Missing the required parameter 'x' when calling EditApi.edit_drop_shadow"
  end
  # verify the required parameter 'y' is set
  if @api_client.config.client_side_validation && y.nil?
    fail ArgumentError, "Missing the required parameter 'y' when calling EditApi.edit_drop_shadow"
  end
  # verify the required parameter 'sigma' is set
  if @api_client.config.client_side_validation && sigma.nil?
    fail ArgumentError, "Missing the required parameter 'sigma' when calling EditApi.edit_drop_shadow"
  end
  # verify the required parameter 'opacity' is set
  if @api_client.config.client_side_validation && opacity.nil?
    fail ArgumentError, "Missing the required parameter 'opacity' when calling EditApi.edit_drop_shadow"
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_drop_shadow"
  end
  # resource path
  local_var_path = '/image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity}'.sub('{' + 'X' + '}', x.to_s).sub('{' + 'Y' + '}', y.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'opacity' + '}', opacity.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_drop_shadow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_invert(image_file, opts = {}) click to toggle source

Invert, negate the colors in the image Inverts (negates) all of the colors in the image. If the image contains transparency, the transparency will first be removed prior to inverting the image. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 684
def edit_invert(image_file, opts = {})
  data, _status_code, _headers = edit_invert_with_http_info(image_file, opts)
  data
end
edit_invert_with_http_info(image_file, opts = {}) click to toggle source

Invert, negate the colors in the image Inverts (negates) all of the colors in the image. If the image contains transparency, the transparency will first be removed prior to inverting the image. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 694
def edit_invert_with_http_info(image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_invert ...'
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_invert"
  end
  # resource path
  local_var_path = '/image/edit/invert'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_invert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_remove_exif_data(image_file, opts = {}) click to toggle source

Remove EXIF data from the image Removes any EXIF data and profiles . @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 739
def edit_remove_exif_data(image_file, opts = {})
  data, _status_code, _headers = edit_remove_exif_data_with_http_info(image_file, opts)
  data
end
edit_remove_exif_data_with_http_info(image_file, opts = {}) click to toggle source

Remove EXIF data from the image Removes any EXIF data and profiles . @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 749
def edit_remove_exif_data_with_http_info(image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_remove_exif_data ...'
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_exif_data"
  end
  # resource path
  local_var_path = '/image/edit/remove-exif'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_remove_exif_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_remove_transparency(image_file, opts = {}) click to toggle source

Remove transparency from the image Removes any active transparency in the image. Effectively renders the image at the same resolution, in the same file format, over a white background, thus removing transparency. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 794
def edit_remove_transparency(image_file, opts = {})
  data, _status_code, _headers = edit_remove_transparency_with_http_info(image_file, opts)
  data
end
edit_remove_transparency_with_http_info(image_file, opts = {}) click to toggle source

Remove transparency from the image Removes any active transparency in the image. Effectively renders the image at the same resolution, in the same file format, over a white background, thus removing transparency. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 804
def edit_remove_transparency_with_http_info(image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_remove_transparency ...'
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_transparency"
  end
  # resource path
  local_var_path = '/image/edit/remove-transparency'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_remove_transparency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_rotate(degrees, image_file, opts = {}) click to toggle source

Rotate an image any number of degrees Rotates an image by an arbitrary number of degrees @param degrees Degrees to rotate the image; values range from 0.0 to 360.0. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 850
def edit_rotate(degrees, image_file, opts = {})
  data, _status_code, _headers = edit_rotate_with_http_info(degrees, image_file, opts)
  data
end
edit_rotate_with_http_info(degrees, image_file, opts = {}) click to toggle source

Rotate an image any number of degrees Rotates an image by an arbitrary number of degrees @param degrees Degrees to rotate the image; values range from 0.0 to 360.0. @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-image-recognition-api-client/api/edit_api.rb, line 861
def edit_rotate_with_http_info(degrees, image_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EditApi.edit_rotate ...'
  end
  # verify the required parameter 'degrees' is set
  if @api_client.config.client_side_validation && degrees.nil?
    fail ArgumentError, "Missing the required parameter 'degrees' when calling EditApi.edit_rotate"
  end
  # verify the required parameter 'image_file' is set
  if @api_client.config.client_side_validation && image_file.nil?
    fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_rotate"
  end
  # resource path
  local_var_path = '/image/edit/rotate/{degrees}/angle'.sub('{' + 'degrees' + '}', degrees.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['imageFile'] = image_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EditApi#edit_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end