Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
#nullable enable

namespace Photoroom
{
public partial interface IPhotoroomClient
{
/// <summary>
/// Remove Background (Basic plan)<br/>
/// Remove background from an image
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Photoroom.ApiException"></exception>
global::System.Threading.Tasks.Task<byte[]> RemoveBackgroundAsBytesAsync(

global::Photoroom.RemoveBackgroundPostParams request,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Remove Background (Basic plan)<br/>
/// Remove background from an image
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Photoroom.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.IO.Stream> RemoveBackgroundAsBytesAsStreamAsync(

global::Photoroom.RemoveBackgroundPostParams request,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Remove Background (Basic plan)<br/>
/// Remove background from an image
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Photoroom.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Photoroom.AutoSDKHttpResponse<byte[]>> RemoveBackgroundAsBytesAsResponseAsync(

global::Photoroom.RemoveBackgroundPostParams request,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Remove Background (Basic plan)<br/>
/// Remove background from an image
/// </summary>
/// <param name="imageFile">
/// The image file to render
/// </param>
/// <param name="imageFilename">
/// The image file to render
/// </param>
/// <param name="format">
/// The format of the resulting image<br/>
/// Default Value: png
/// </param>
/// <param name="channels">
/// The channels of the resulting image<br/>
/// Default Value: rgba
/// </param>
/// <param name="bgColor">
/// The background color of the resulting image. Can be a hex code (`#FF00FF`) or a HTML color (`red`, `green`, etc.)
/// </param>
/// <param name="size">
/// Will resize the output to the specified size. Can be `preview` (0.25 Megapixels), `medium` (1.5 MP), `hd` (4 MP) or `full` (36 MP, can be slower for large images). Useful for mobile apps that need smaller images.<br/>
/// Default Value: full
/// </param>
/// <param name="crop">
/// If `true`, the image returned is cropped to the cutout border. Transparent pixels are removed from the border<br/>
/// Default Value: false
/// </param>
/// <param name="despill">
/// If `true`, automatically removes colored reflections that have been left on the main subject by a green background.<br/>
/// Default Value: false
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<byte[]> RemoveBackgroundAsBytesAsync(
byte[] imageFile,
string imageFilename,
global::Photoroom.RemoveBackgroundPostParamsFormat? format = default,
global::Photoroom.RemoveBackgroundPostParamsChannels? channels = default,
string? bgColor = default,
global::Photoroom.RemoveBackgroundPostParamsSize? size = default,
global::Photoroom.RemoveBackgroundPostParamsCrop? crop = default,
global::Photoroom.RemoveBackgroundPostParamsDespill? despill = default,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Remove Background (Basic plan)<br/>
/// Remove background from an image
/// </summary>
/// <param name="imageFile">
/// The image file to render
/// </param>
/// <param name="imageFilename">
/// The image file to render
/// </param>
/// <param name="format">
/// The format of the resulting image<br/>
/// Default Value: png
/// </param>
/// <param name="channels">
/// The channels of the resulting image<br/>
/// Default Value: rgba
/// </param>
/// <param name="bgColor">
/// The background color of the resulting image. Can be a hex code (`#FF00FF`) or a HTML color (`red`, `green`, etc.)
/// </param>
/// <param name="size">
/// Will resize the output to the specified size. Can be `preview` (0.25 Megapixels), `medium` (1.5 MP), `hd` (4 MP) or `full` (36 MP, can be slower for large images). Useful for mobile apps that need smaller images.<br/>
/// Default Value: full
/// </param>
/// <param name="crop">
/// If `true`, the image returned is cropped to the cutout border. Transparent pixels are removed from the border<br/>
/// Default Value: false
/// </param>
/// <param name="despill">
/// If `true`, automatically removes colored reflections that have been left on the main subject by a green background.<br/>
/// Default Value: false
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Photoroom.ApiException"></exception>
global::System.Threading.Tasks.Task<byte[]> RemoveBackgroundAsBytesAsync(
global::System.IO.Stream imageFile,
string imageFilename,
global::Photoroom.RemoveBackgroundPostParamsFormat? format = default,
global::Photoroom.RemoveBackgroundPostParamsChannels? channels = default,
string? bgColor = default,
global::Photoroom.RemoveBackgroundPostParamsSize? size = default,
global::Photoroom.RemoveBackgroundPostParamsCrop? crop = default,
global::Photoroom.RemoveBackgroundPostParamsDespill? despill = default,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Remove Background (Basic plan)<br/>
/// Remove background from an image
/// </summary>
/// <param name="imageFile">
/// The image file to render
/// </param>
/// <param name="imageFilename">
/// The image file to render
/// </param>
/// <param name="format">
/// The format of the resulting image<br/>
/// Default Value: png
/// </param>
/// <param name="channels">
/// The channels of the resulting image<br/>
/// Default Value: rgba
/// </param>
/// <param name="bgColor">
/// The background color of the resulting image. Can be a hex code (`#FF00FF`) or a HTML color (`red`, `green`, etc.)
/// </param>
/// <param name="size">
/// Will resize the output to the specified size. Can be `preview` (0.25 Megapixels), `medium` (1.5 MP), `hd` (4 MP) or `full` (36 MP, can be slower for large images). Useful for mobile apps that need smaller images.<br/>
/// Default Value: full
/// </param>
/// <param name="crop">
/// If `true`, the image returned is cropped to the cutout border. Transparent pixels are removed from the border<br/>
/// Default Value: false
/// </param>
/// <param name="despill">
/// If `true`, automatically removes colored reflections that have been left on the main subject by a green background.<br/>
/// Default Value: false
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Photoroom.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.IO.Stream> RemoveBackgroundAsBytesAsStreamAsync(
global::System.IO.Stream imageFile,
string imageFilename,
global::Photoroom.RemoveBackgroundPostParamsFormat? format = default,
global::Photoroom.RemoveBackgroundPostParamsChannels? channels = default,
string? bgColor = default,
global::Photoroom.RemoveBackgroundPostParamsSize? size = default,
global::Photoroom.RemoveBackgroundPostParamsCrop? crop = default,
global::Photoroom.RemoveBackgroundPostParamsDespill? despill = default,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Remove Background (Basic plan)<br/>
/// Remove background from an image
/// </summary>
/// <param name="imageFile">
/// The image file to render
/// </param>
/// <param name="imageFilename">
/// The image file to render
/// </param>
/// <param name="format">
/// The format of the resulting image<br/>
/// Default Value: png
/// </param>
/// <param name="channels">
/// The channels of the resulting image<br/>
/// Default Value: rgba
/// </param>
/// <param name="bgColor">
/// The background color of the resulting image. Can be a hex code (`#FF00FF`) or a HTML color (`red`, `green`, etc.)
/// </param>
/// <param name="size">
/// Will resize the output to the specified size. Can be `preview` (0.25 Megapixels), `medium` (1.5 MP), `hd` (4 MP) or `full` (36 MP, can be slower for large images). Useful for mobile apps that need smaller images.<br/>
/// Default Value: full
/// </param>
/// <param name="crop">
/// If `true`, the image returned is cropped to the cutout border. Transparent pixels are removed from the border<br/>
/// Default Value: false
/// </param>
/// <param name="despill">
/// If `true`, automatically removes colored reflections that have been left on the main subject by a green background.<br/>
/// Default Value: false
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Photoroom.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Photoroom.AutoSDKHttpResponse<byte[]>> RemoveBackgroundAsBytesAsResponseAsync(
global::System.IO.Stream imageFile,
string imageFilename,
global::Photoroom.RemoveBackgroundPostParamsFormat? format = default,
global::Photoroom.RemoveBackgroundPostParamsChannels? channels = default,
string? bgColor = default,
global::Photoroom.RemoveBackgroundPostParamsSize? size = default,
global::Photoroom.RemoveBackgroundPostParamsCrop? crop = default,
global::Photoroom.RemoveBackgroundPostParamsDespill? despill = default,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ partial void ProcessRemoveBackgroundResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

__httpRequest.Headers.TryAddWithoutValidation(
"Accept",
"application/json");

foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
Expand Down Expand Up @@ -808,6 +812,10 @@ request.ImageFilename is null
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

__httpRequest.Headers.TryAddWithoutValidation(
"Accept",
"application/json");

foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
Expand Down Expand Up @@ -1407,6 +1415,10 @@ request.ImageFilename is null
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

__httpRequest.Headers.TryAddWithoutValidation(
"Accept",
"application/json");

foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
Expand Down
Loading