Skip to content

Commit

Permalink
Updated CreateCanvas to move 'format' to the same level as the 'w', '…
Browse files Browse the repository at this point in the history
…h', and 'color' properties to resolve json error.
  • Loading branch information
jakenuts committed May 14, 2024
1 parent d0b5fdc commit ce2e7c4
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 23 deletions.
10 changes: 7 additions & 3 deletions src/Imageflow/Fluent/ImageJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,13 @@ private BuildNode CreateCanvas(uint w, uint h, AnyColor color, PixelFormat forma
BuildNode.StartNode(this,
//new {create_canvas = new {w, h, color = color.ToImageflowDynamic()
new JsonObject() {{"create_canvas", new JsonObject()
{{"w", w}, {"h", h},
{"color", color.ToJsonNode()}}},
{"format", format.ToString().ToLowerInvariant()}});
{
{"w", w},
{"h", h},
{"color", color.ToJsonNode()},
{"format", format.ToString().ToLowerInvariant()}
}
}});

[Obsolete("Use a BufferedStreamSource or MemorySource for the source parameter instead")]
public BuildEndpoint BuildCommandString(IBytesSource source, IOutputDestination dest, string commandString) => BuildCommandString(source, null, dest, null, commandString);
Expand Down
54 changes: 34 additions & 20 deletions tests/Imageflow.Test/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
"Microsoft.CodeCoverage": "17.9.0"
}
},
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net481": "1.0.3"
}
},
"Newtonsoft.Json": {
"type": "Direct",
"requested": "[13.0.3, 14.0.0)",
Expand Down Expand Up @@ -74,10 +83,10 @@
"xunit.extensibility.execution": {
"type": "Direct",
"requested": "[2.*, )",
"resolved": "2.7.0",
"contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==",
"resolved": "2.8.0",
"contentHash": "TyyrZesHB9ODZMS9c73OqiBz4x0vL944JCkSPBWW5w6PF2LlUfdfXRjjOhoIOuY6lTmEgl07rS4/Jot9mCYnpg==",
"dependencies": {
"xunit.extensibility.core": "[2.7.0]"
"xunit.extensibility.core": "[2.8.0]"
}
},
"xunit.runner.visualstudio": {
Expand Down Expand Up @@ -122,6 +131,11 @@
"resolved": "17.9.0",
"contentHash": "RGD37ZSrratfScYXm7M0HjvxMxZyWZL4jm+XgMZbkIY1UPgjUpbNA/t+WTGj/rC/0Hm9A3IrH3ywbKZkOCnoZA=="
},
"Microsoft.NETFramework.ReferenceAssemblies.net481": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "Vv/20vgHS7VglVOVh8J3Iz/MA+VYKVRp9f7r2qiKBMuzviTOmocG70yq0Q8T5OTmCONkEAIJwETD1zhEfLkAXQ=="
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
"resolved": "17.8.0",
Expand Down Expand Up @@ -223,8 +237,8 @@
},
"xunit.extensibility.core": {
"type": "Transitive",
"resolved": "2.7.0",
"contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==",
"resolved": "2.8.0",
"contentHash": "eBJv9xQeY0p5z+C/L1tFjUFYqtl5pQqIEYCGTMl+MbRzA7sOlgYKwJE//vEePBp+mgBh7NjD0Qhz0liZBYM27w==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
Expand Down Expand Up @@ -314,10 +328,10 @@
"xunit.extensibility.execution": {
"type": "Direct",
"requested": "[2.*, )",
"resolved": "2.7.0",
"contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==",
"resolved": "2.8.0",
"contentHash": "TyyrZesHB9ODZMS9c73OqiBz4x0vL944JCkSPBWW5w6PF2LlUfdfXRjjOhoIOuY6lTmEgl07rS4/Jot9mCYnpg==",
"dependencies": {
"xunit.extensibility.core": "[2.7.0]"
"xunit.extensibility.core": "[2.8.0]"
}
},
"xunit.runner.visualstudio": {
Expand Down Expand Up @@ -412,8 +426,8 @@
},
"xunit.extensibility.core": {
"type": "Transitive",
"resolved": "2.7.0",
"contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==",
"resolved": "2.8.0",
"contentHash": "eBJv9xQeY0p5z+C/L1tFjUFYqtl5pQqIEYCGTMl+MbRzA7sOlgYKwJE//vEePBp+mgBh7NjD0Qhz0liZBYM27w==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
Expand Down Expand Up @@ -501,10 +515,10 @@
"xunit.extensibility.execution": {
"type": "Direct",
"requested": "[2.*, )",
"resolved": "2.7.0",
"contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==",
"resolved": "2.8.0",
"contentHash": "TyyrZesHB9ODZMS9c73OqiBz4x0vL944JCkSPBWW5w6PF2LlUfdfXRjjOhoIOuY6lTmEgl07rS4/Jot9mCYnpg==",
"dependencies": {
"xunit.extensibility.core": "[2.7.0]"
"xunit.extensibility.core": "[2.8.0]"
}
},
"xunit.runner.visualstudio": {
Expand Down Expand Up @@ -599,8 +613,8 @@
},
"xunit.extensibility.core": {
"type": "Transitive",
"resolved": "2.7.0",
"contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==",
"resolved": "2.8.0",
"contentHash": "eBJv9xQeY0p5z+C/L1tFjUFYqtl5pQqIEYCGTMl+MbRzA7sOlgYKwJE//vEePBp+mgBh7NjD0Qhz0liZBYM27w==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
Expand Down Expand Up @@ -688,10 +702,10 @@
"xunit.extensibility.execution": {
"type": "Direct",
"requested": "[2.*, )",
"resolved": "2.7.0",
"contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==",
"resolved": "2.8.0",
"contentHash": "TyyrZesHB9ODZMS9c73OqiBz4x0vL944JCkSPBWW5w6PF2LlUfdfXRjjOhoIOuY6lTmEgl07rS4/Jot9mCYnpg==",
"dependencies": {
"xunit.extensibility.core": "[2.7.0]"
"xunit.extensibility.core": "[2.8.0]"
}
},
"xunit.runner.visualstudio": {
Expand Down Expand Up @@ -786,8 +800,8 @@
},
"xunit.extensibility.core": {
"type": "Transitive",
"resolved": "2.7.0",
"contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==",
"resolved": "2.8.0",
"contentHash": "eBJv9xQeY0p5z+C/L1tFjUFYqtl5pQqIEYCGTMl+MbRzA7sOlgYKwJE//vEePBp+mgBh7NjD0Qhz0liZBYM27w==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
Expand Down
88 changes: 88 additions & 0 deletions tests/Imageflow.TestDotNetFullPackageReference/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,94 @@
"System.Text.Json": "[6.*, )"
}
}
},
".NETFramework,Version=v4.7.2/win": {
"Imageflow.NativeRuntime.osx-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "3wEglrMqVzlnAVBTdK6qcRySdo/4ajBP5ASRuK3yHfBqPp3ld4ke6guxuSZbgDTObIxai7KTLlsIvQZhusymUA=="
},
"Imageflow.NativeRuntime.ubuntu-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "H8K5kZqcM3IliDRZD3H8BN6TbeLgcW+6FsDZ3EvlqBvu41s+Lv9vxE+c3m1cUQhsYBs76udUhgJFNR1D6x3U5g=="
},
"Imageflow.NativeRuntime.win-x86": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "WunIva5NZ2iMPKCyz8ZTkN7SRaW3szBijMg5YK7jaSFZHw8Xiky/GFfghc0XgWTuILxwO4YbY86e8QvW8CBigQ=="
},
"Imageflow.NativeRuntime.win-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "1rY6C9Hjj7U9toa7FlnveiSBKccZlvCaHwdxPRQS0vDpAZZCJrTA/H7VYdreifpnIDInYcf0i/3oEKzEnj884w=="
}
},
".NETFramework,Version=v4.7.2/win-arm64": {
"Imageflow.NativeRuntime.osx-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "3wEglrMqVzlnAVBTdK6qcRySdo/4ajBP5ASRuK3yHfBqPp3ld4ke6guxuSZbgDTObIxai7KTLlsIvQZhusymUA=="
},
"Imageflow.NativeRuntime.ubuntu-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "H8K5kZqcM3IliDRZD3H8BN6TbeLgcW+6FsDZ3EvlqBvu41s+Lv9vxE+c3m1cUQhsYBs76udUhgJFNR1D6x3U5g=="
},
"Imageflow.NativeRuntime.win-x86": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "WunIva5NZ2iMPKCyz8ZTkN7SRaW3szBijMg5YK7jaSFZHw8Xiky/GFfghc0XgWTuILxwO4YbY86e8QvW8CBigQ=="
},
"Imageflow.NativeRuntime.win-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "1rY6C9Hjj7U9toa7FlnveiSBKccZlvCaHwdxPRQS0vDpAZZCJrTA/H7VYdreifpnIDInYcf0i/3oEKzEnj884w=="
}
},
".NETFramework,Version=v4.7.2/win-x64": {
"Imageflow.NativeRuntime.osx-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "3wEglrMqVzlnAVBTdK6qcRySdo/4ajBP5ASRuK3yHfBqPp3ld4ke6guxuSZbgDTObIxai7KTLlsIvQZhusymUA=="
},
"Imageflow.NativeRuntime.ubuntu-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "H8K5kZqcM3IliDRZD3H8BN6TbeLgcW+6FsDZ3EvlqBvu41s+Lv9vxE+c3m1cUQhsYBs76udUhgJFNR1D6x3U5g=="
},
"Imageflow.NativeRuntime.win-x86": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "WunIva5NZ2iMPKCyz8ZTkN7SRaW3szBijMg5YK7jaSFZHw8Xiky/GFfghc0XgWTuILxwO4YbY86e8QvW8CBigQ=="
},
"Imageflow.NativeRuntime.win-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "1rY6C9Hjj7U9toa7FlnveiSBKccZlvCaHwdxPRQS0vDpAZZCJrTA/H7VYdreifpnIDInYcf0i/3oEKzEnj884w=="
}
},
".NETFramework,Version=v4.7.2/win-x86": {
"Imageflow.NativeRuntime.osx-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "3wEglrMqVzlnAVBTdK6qcRySdo/4ajBP5ASRuK3yHfBqPp3ld4ke6guxuSZbgDTObIxai7KTLlsIvQZhusymUA=="
},
"Imageflow.NativeRuntime.ubuntu-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "H8K5kZqcM3IliDRZD3H8BN6TbeLgcW+6FsDZ3EvlqBvu41s+Lv9vxE+c3m1cUQhsYBs76udUhgJFNR1D6x3U5g=="
},
"Imageflow.NativeRuntime.win-x86": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "WunIva5NZ2iMPKCyz8ZTkN7SRaW3szBijMg5YK7jaSFZHw8Xiky/GFfghc0XgWTuILxwO4YbY86e8QvW8CBigQ=="
},
"Imageflow.NativeRuntime.win-x86_64": {
"type": "Transitive",
"resolved": "2.0.0-preview8",
"contentHash": "1rY6C9Hjj7U9toa7FlnveiSBKccZlvCaHwdxPRQS0vDpAZZCJrTA/H7VYdreifpnIDInYcf0i/3oEKzEnj884w=="
}
}
}
}

0 comments on commit ce2e7c4

Please sign in to comment.