You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bigframes/operations/blob.py
+62Lines changed: 62 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -322,6 +322,68 @@ def image_blur(
322
322
323
323
returndst
324
324
325
+
defimage_resize(
326
+
self,
327
+
dsize: tuple[int, int] = (0, 0),
328
+
*,
329
+
fx: float=0.0,
330
+
fy: float=0.0,
331
+
dst: Union[str, bigframes.series.Series],
332
+
connection: Optional[str] =None,
333
+
):
334
+
"""Resize images.
335
+
336
+
.. note::
337
+
BigFrames Blob is still under experiments. It may not work and subject to change in the future.
338
+
339
+
Args:
340
+
dsize (tuple(int, int), default (0, 0)): Destination size. If set to 0, fx and fy parameters determine the size.
341
+
fx (float, default 0.0): scale factor along the horizontal axis. If set to 0.0, dsize parameter determines the output size.
342
+
fy (float, defalut 0.0): scale factor along the vertical axis. If set to 0.0, dsize parameter determines the output size.
343
+
dst (str or bigframes.series.Series): Destination GCS folder str or blob series.
344
+
connection (str or None, default None): BQ connection used for function internet transactions, and the output blob if "dst" is str. If None, uses default connection of the session.
345
+
346
+
Returns:
347
+
BigFrames Blob Series
348
+
"""
349
+
dsize_set=dsize[0] >0anddsize[1] >0
350
+
fsize_set=fx>0.0andfy>0.0
351
+
ifnotdsize_set^fsize_set:
352
+
raiseValueError(
353
+
"Only one of dsize or (fx, fy) parameters must be set. And the set values must be positive. "
0 commit comments