Class: RemoveBg::RequestOptions
- Inherits:
-
BaseRequestOptions
- Object
- BaseRequestOptions
- RemoveBg::RequestOptions
- Defined in:
- lib/remove_bg/request_options.rb
Overview
Options for image processing requests. Arbitary options are passed directly to the API.
Constant Summary collapse
- SIZE_REGULAR =
"regular"
- SIZE_MEDIUM =
"medium"
- SIZE_HD =
"hd"
- SIZE_4K =
"4k"
- SIZE_AUTO =
"auto"
- FOREGROUND_TYPE_AUTO =
"auto"
- FOREGROUND_TYPE_PERSON =
"person"
- FOREGROUND_TYPE_PRODUCT =
"product"
- CHANNELS_RGBA =
"rgba"
- CHANNELS_ALPHA =
"alpha"
- FORMAT_PNG =
"png"
- FORMAT_ZIP =
"zip"
- FORMAT_JPG =
"jpg"
Instance Attribute Summary
Attributes inherited from BaseRequestOptions
Instance Method Summary collapse
-
#initialize(raw_options = {}) ⇒ RequestOptions
constructor
A new instance of RequestOptions.
Constructor Details
#initialize(raw_options = {}) ⇒ RequestOptions
Returns a new instance of RequestOptions.
26 27 28 29 30 31 32 33 |
# File 'lib/remove_bg/request_options.rb', line 26 def initialize( = {}) = .dup [:size] ||= SIZE_AUTO [:format] = optimize_format([:format]) if .key?(:format) super() end |