Skip to content

Commit 2d413f1

Browse files
author
Paul Manzotti
committed
Added missing background transform to TinyPNG convert call
1 parent 7474a06 commit 2d413f1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/TinyPNG/Extensions/ConvertExtensions.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ public static async Task<TinyPngConvertResponse> Convert(this Task<TinyPngCompre
3333

3434
TinyPngCompressResponse compressResponse = await result;
3535

36-
string requestBody = JsonSerializer.Serialize(new { convert = new { type = convertOperation } }, TinyPngClient._jsonOptions);
36+
string requestBody = JsonSerializer.Serialize(new {
37+
convert = new
38+
{
39+
type = convertOperation
40+
},
41+
transform = new
42+
{
43+
background = backgroundTransform
44+
}
45+
}, TinyPngClient._jsonOptions);
3746

3847
HttpRequestMessage msg = new(HttpMethod.Post, compressResponse.Output.Url)
3948
{

0 commit comments

Comments
 (0)