Class: Getimg::Client::Enhancements
- Inherits:
-
Object
- Object
- Getimg::Client::Enhancements
- Defined in:
- lib/getimg/client/enhancements.rb
Instance Method Summary collapse
-
#face_fix(options = {}) ⇒ Object
gen = client.enhancements.face_fix(“gfpgan-v1-3”, image: Getimg::Image.new.file_to_base64(“test.PNG”), output_format: “png”) Getimg::Image.new.base64_to_file(gen).
-
#initialize(client) ⇒ Enhancements
constructor
A new instance of Enhancements.
-
#upscale(options = {}) ⇒ Object
gen = client.enhancements.upscale(“real-esrgan-4x”, image: Getimg::Image.new.file_to_base64(“xl-test.PNG”), scale: 4, output_format: “png”) Getimg::Image.new.base64_to_file(gen).
Constructor Details
#initialize(client) ⇒ Enhancements
Returns a new instance of Enhancements.
6 7 8 |
# File 'lib/getimg/client/enhancements.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#face_fix(options = {}) ⇒ Object
gen = client.enhancements.face_fix(“gfpgan-v1-3”, image: Getimg::Image.new.file_to_base64(“test.PNG”), output_format: “png”) Getimg::Image.new.base64_to_file(gen)
29 30 31 |
# File 'lib/getimg/client/enhancements.rb', line 29 def face_fix( = {}) @client.post("/enhancements/face-fix", ) end |
#upscale(options = {}) ⇒ Object
gen = client.enhancements.upscale(“real-esrgan-4x”, image: Getimg::Image.new.file_to_base64(“xl-test.PNG”), scale: 4, output_format: “png”) Getimg::Image.new.base64_to_file(gen)
18 19 20 |
# File 'lib/getimg/client/enhancements.rb', line 18 def upscale( = {}) @client.post("/enhancements/upscale", ) end |