GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(studio_shot): add enhance + enhance_strength params; bump 0.5.0 · useknockout/python@d30c25c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • pyproject.toml
  • src/useknockout
    • async_client.py
    • client.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ c.outline("photo.jpg", outline_color="#000000", outline_width=4)
9797
# Presets
9898
c.studio_shot("photo.jpg", aspect="1:1", shadow=True) # e-commerce
9999
c.studio_shot("photo.jpg", transparent=True) # transparent bg (PNG)
100+
c.studio_shot("photo.jpg", enhance=True) # brightness + saturation lift
100101
c.headshot("photo.jpg", bg_color="#FFFFFF") # LinkedIn 4:5 portrait
101102
c.headshot("photo.jpg", bg_blur=True, blur_radius=24) # blurred original bg
102103

Collapse file

‎pyproject.toml‎

Copy file name to clipboardExpand all lines: pyproject.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "useknockout"
7-
version = "0.4.0"
7+
version = "0.5.0"
88
description = "Python SDK for useknockout — state-of-the-art background removal API."
99
readme = "README.md"
1010
license = { text = "MIT" }
Collapse file

‎src/useknockout/async_client.py‎

Copy file name to clipboardExpand all lines: src/useknockout/async_client.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ async def studio_shot(
259259
padding: int = 48,
260260
shadow: bool = True,
261261
transparent: bool = False,
262+
enhance: bool = False,
263+
enhance_strength: float = 0.15,
262264
format: str = "jpg",
263265
) -> bytes:
264266
return await self._request_bytes(
@@ -272,6 +274,8 @@ async def studio_shot(
272274
"padding": padding,
273275
"shadow": shadow,
274276
"transparent": transparent,
277+
"enhance": enhance,
278+
"enhance_strength": enhance_strength,
275279
"format": format,
276280
}
277281
),
Collapse file

‎src/useknockout/client.py‎

Copy file name to clipboardExpand all lines: src/useknockout/client.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,18 @@ def studio_shot(
284284
padding: int = 48,
285285
shadow: bool = True,
286286
transparent: bool = False,
287+
enhance: bool = False,
288+
enhance_strength: float = 0.15,
287289
format: str = "jpg",
288290
) -> bytes:
289291
"""POST /studio-shot — e-commerce preset (cutout + crop + center + shadow).
290292
291293
Set ``transparent=True`` to keep a transparent background (bg_color and
292294
shadow are ignored; output is PNG, jpg is coerced).
295+
296+
Set ``enhance=True`` for a subtle brightness + saturation lift on the
297+
subject (ecommerce-ready). ``enhance_strength`` (0.0-0.5, default 0.15)
298+
controls the amount and only applies when ``enhance`` is True.
293299
"""
294300
return self._request_bytes(
295301
"POST",
@@ -302,6 +308,8 @@ def studio_shot(
302308
"padding": padding,
303309
"shadow": shadow,
304310
"transparent": transparent,
311+
"enhance": enhance,
312+
"enhance_strength": enhance_strength,
305313
"format": format,
306314
}
307315
),

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.