tryiton 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc7c9b0e58bea7120e432b59b8db60364d95f66f2962fdc54e04a64602d8d757
4
- data.tar.gz: e1f08ab852de54a201dc962e9799d35853b7b7a8c1da8c6947e3d1d135a85814
3
+ metadata.gz: 7c29cb70e6a0857471cb63749df6c190bb0d19c778069f7b03a24c20815732d6
4
+ data.tar.gz: 1e2b498866ed7fa33d7c221f5a5b81ae5c377a5536b681a2c38838a23a3414e2
5
5
  SHA512:
6
- metadata.gz: b577a2d18b96023088aa636b0a287ec4a96581c264017fbc0aefb981af926b8bc49d1437964738e52e43da421628b7725028b7ac94dc54ca490c981769e4b445
7
- data.tar.gz: 327f7c89b5a2b35f6dad23b60faaaaf6ee21e4ff7d39a42ea87ad29651eadd11c95679c000cc5c655893f386ecfd92104c05c38122009329a9969705dbb4d859
6
+ metadata.gz: 3b3d0a9ec7b6b952364520a361001dff2a295d8a7f9a2059d1eb94919938eeba070765506f0d721849af0990e4b2435b35e2474eb57de9f1757cef8ff113f0f2
7
+ data.tar.gz: 81d717005e65bbf86dca449c06535acfd464289bf62ee189d48ab449dd8ec732c392b2f4227b1814e7f61ffa00dbb0e862403963d6e227d14403894f2225a14e
data/README.md CHANGED
@@ -54,7 +54,7 @@ Image inputs accept a public URL or a base64 data URL (`data:image/png;base64,..
54
54
  | --------- | ---- | -------- | ----------- |
55
55
  | `model_image` | String | Yes | URL or base64 data URL of the person. |
56
56
  | `garment_image` | String | Yes | URL or base64 data URL of the garment or accessory. |
57
- | `category` | String | No | Item type: `auto`, `clothing`, `eyewear`, `footwear`, `headwear`, `jewelry`, `accessories`, or `others`. `auto` detects it for you. |
57
+ | `category` | String | No | Item type: `auto`, `clothing`, `eyewear`, `footwear`, `headwear`, `jewelry`, or `accessories`. `auto` detects it for you. |
58
58
  | `subcategory` | String | No | Required for `clothing` (`tops`, `bottoms`, `dresses`), `jewelry`, and `accessories`. |
59
59
 
60
60
  Additional options (`mode` and `moderation_level` for clothing; `num_samples` 1–4 and `output_format` `png`/`jpeg` for every try-on, including hairstyle and tattoo) are documented in the [API reference](https://docs.tryiton.now).
@@ -65,8 +65,10 @@ Additional options (`mode` and `moderation_level` for clothing; `num_samples` 1
65
65
  # Hairstyle try-on (see Tryiton::HAIRCUTS for all supported values)
66
66
  client.try_on_hairstyle(face_image: face_url, haircut: "BuzzCut", hair_color: "ash blonde")
67
67
 
68
- # Tattoo try-on
68
+ # Tattoo try-on — place it with free text...
69
69
  client.try_on_tattoo(body_image: body_url, design_image: design_url, placement: "on the right forearm, small")
70
+ # ...or pin the exact spot with a region box (normalized 0-1, from the image's top-left)
71
+ client.try_on_tattoo(body_image: body_url, design_image: design_url, region: { x: 0.32, y: 0.18, w: 0.28, h: 0.34 })
70
72
 
71
73
  # Poll a job manually, or check your credit balance
72
74
  status = client.get_status(job_id) # { "status" => ..., "output" => [...], "error" => ... }
@@ -66,8 +66,14 @@ module Tryiton
66
66
  end
67
67
 
68
68
  # Ink a design onto skin. Returns the job id.
69
- # Keys: body_image (required), design_image (required), placement,
69
+ # Keys: body_image (required), design_image (required), placement, region,
70
70
  # num_samples (1-4), output_format ("png"/"jpeg").
71
+ #
72
+ # Position the ink two ways, and they compose: +placement+ is free text
73
+ # ("on the right forearm, small"); +region+ pins the exact spot as
74
+ # { x:, y:, w:, h: }, normalized 0-1 from the body image's top-left corner,
75
+ # each side at least 0.06. With a region, +placement+ only describes
76
+ # size/style.
71
77
  def try_on_tattoo(**params)
72
78
  request(:post, "/tryon/tattoo", params)["jobId"]
73
79
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tryiton
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tryiton
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TryItOn