| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 0 | 0 | — |
| Commands | 0 | 0 | 0 | — |
| Section tags | 0 | 0 | 0 | — |
What each file covers
Sections
neither file has anyCommands
neither file has anySection tags
neither file has anyLine diff
imazen/imageflow · .cursor/rules/ffi.mdc
@@ −1 @@
1---
2description:
3globs:
4alwaysApply: true
5---
6Imageflow offers a very stable ABI, focused on sending/recieving JSON and byte buffers in conjuction with an endpoint string. There are wrappers in C# (the main one), go, node, elixr, and more. Keeping these wrappers up-to-date with the latest JSON features is difficult, and the nature of the JSON graph structure makes it require simpler API wrappers.
7
8For the HTTP-like endpoint names, see @/imageflow_core/src/context_method.rs
9
10For the FFI ABI, read @/imageflow_abi/src/lib.rs and [imageflow_default.h](mdc:bindings/headers/imageflow_default.h)
11
12
13
imazen/imageflow · .cursor/rules/riapi.mdc
@@ +1 @@
1---
2description:
3globs: *.rs,*.md
4alwaysApply: false
5---
6It's important to reference the files below when touching anything to do with the Imageflow API, Instructions, querystring commands, RIAPI, or Ir4Commands.
7
8To work effectively with Imageflow, you should understand that Imageflow's main (98%) usage path is via querystring commands, like ?w=20&h=20.
9
10This syntax is backwards compatible with ImageResizer 1,2,3,4. There are around 100 commands, defined in @/imageflow_riapi/src/ir4/parsing.rs and @/imageflow_riapi/src/srcset.rs, and are transformed to JSON with the logic in @/imageflow_riapi/src/encoder.rs, @/imageflow_riapi/src/layout.rs, @/imageflow_riapi/src/mod.rs, and @/imageflow_riapi/sizing.rs. The query is not expanded to JSON all at once, part happens before the image is decoded, and part happens afterwards.
11
12These commands are partially documented in @/docs/src/querystring/encoding.md, @/docs/src/querystring/examples.md, @/docs/src/querystring/filters.md, @/docs/src/querystring/introduction.md, @/docs/src/querystring/transforms.md, and @/docs/src/querystring/rfc-qp.md, and we need to keep them up-to-date.
13
14We want to expand unit tests to cover common cases, so that we can prove our documented explanations are correct, and expand that documentation with concrete examples.
15
16Users typically interact via Imageflow.Net, a C# wrapper over the JSON FFI interface (see [ffi.mdc](mdc:.cursor/rules/ffi.mdc)), or via Imageflow Server (https://github.com/imazen/imageflow-server), which offers an HTTP API, and lets you map image sources to virtual paths and add querystrings to modify them on-the-fly (thus our focus on performance.) There are other bindings for go/node/elixr/etc.
17
18The current project also contains the imageflow_tool command-line tool, which can be used with JSON or like `imageflow_tool v1/querystring --command width=60&height=40&mode=max&format=jpg --in 100x100.jpg --out out4.jpg`, which is implemented in @/imageflow_tool/src/lib.rs, @/imageflow_tool/src/self_test.rs, and @/imageflow_tool/src/cmd_build.rs,
19
20NB: When working on @/imageflow_riapi/src/parsing.rs, make sure both serialization and deserialization are fully tested, and that new querystring keys are added to that allowlist array.
21
22When making examples for docs or schema, we try to use good, stunning photographs when we can, via our RIAPI compliant Imageflow Server deployment at https://i.zr.io/ri/i/glacier.jpg?w=300
23
24Here are some base URLs, with their intrinsic sizes and aspect ratios:
25
26https://i.zr.io/ri/i/above-trees.jpg 2400x3200 3:4
27https://i.zr.io/ri/i/above-trees_orig.jpg 6048x8064 3:4
28https://i.zr.io/ri/i/glacier.jpg 2400x3600 2:3
29https://i.zr.io/ri/i/horse.jpg 2400x3600 2:3
30https://i.zr.io/ri/i/komodo-island.jpg 2400x3226 1200:1613
31https://i.zr.io/ri/i/lake-town.jpg 2400x3598 1200:1799
32https://i.zr.io/ri/i/pearl-tower.jpg 2400x3600 2:3
33https://i.zr.io/ri/i/sahara.jpg 2400x1600 3:2
34https://i.zr.io/ri/i/santorini.jpg 2400x3600 2:3
35https://i.zr.io/ri/i/snowy-trees.jpg 2400x1797 800:599
36https://i.zr.io/ri/i/woman.jpg 2400x3600 2:3
@@ −1 +1 @@
11 ---
22 description:
3−globs:
4−alwaysApply: true
3+globs: *.rs,*.md
4+alwaysApply: false
55 ---
6−Imageflow offers a very stable ABI, focused on sending/recieving JSON and byte buffers in conjuction with an endpoint string. There are wrappers in C# (the main one), go, node, elixr, and more. Keeping these wrappers up-to-date with the latest JSON features is difficult, and the nature of the JSON graph structure makes it require simpler API wrappers.
6+It's important to reference the files below when touching anything to do with the Imageflow API, Instructions, querystring commands, RIAPI, or Ir4Commands.
77
8−For the HTTP-like endpoint names, see @/imageflow_core/src/context_method.rs
8+To work effectively with Imageflow, you should understand that Imageflow's main (98%) usage path is via querystring commands, like ?w=20&h=20.
99
10−For the FFI ABI, read @/imageflow_abi/src/lib.rs and [imageflow_default.h](mdc:bindings/headers/imageflow_default.h)
10+This syntax is backwards compatible with ImageResizer 1,2,3,4. There are around 100 commands, defined in @/imageflow_riapi/src/ir4/parsing.rs and @/imageflow_riapi/src/srcset.rs, and are transformed to JSON with the logic in @/imageflow_riapi/src/encoder.rs, @/imageflow_riapi/src/layout.rs, @/imageflow_riapi/src/mod.rs, and @/imageflow_riapi/sizing.rs. The query is not expanded to JSON all at once, part happens before the image is decoded, and part happens afterwards.
1111
12+These commands are partially documented in @/docs/src/querystring/encoding.md, @/docs/src/querystring/examples.md, @/docs/src/querystring/filters.md, @/docs/src/querystring/introduction.md, @/docs/src/querystring/transforms.md, and @/docs/src/querystring/rfc-qp.md, and we need to keep them up-to-date.
1213
14+We want to expand unit tests to cover common cases, so that we can prove our documented explanations are correct, and expand that documentation with concrete examples.
1315
16+Users typically interact via Imageflow.Net, a C# wrapper over the JSON FFI interface (see [ffi.mdc](mdc:.cursor/rules/ffi.mdc)), or via Imageflow Server (https://github.com/imazen/imageflow-server), which offers an HTTP API, and lets you map image sources to virtual paths and add querystrings to modify them on-the-fly (thus our focus on performance.) There are other bindings for go/node/elixr/etc.
17+
18+The current project also contains the imageflow_tool command-line tool, which can be used with JSON or like `imageflow_tool v1/querystring --command width=60&height=40&mode=max&format=jpg --in 100x100.jpg --out out4.jpg`, which is implemented in @/imageflow_tool/src/lib.rs, @/imageflow_tool/src/self_test.rs, and @/imageflow_tool/src/cmd_build.rs,
19+
20+NB: When working on @/imageflow_riapi/src/parsing.rs, make sure both serialization and deserialization are fully tested, and that new querystring keys are added to that allowlist array.
21+
22+When making examples for docs or schema, we try to use good, stunning photographs when we can, via our RIAPI compliant Imageflow Server deployment at https://i.zr.io/ri/i/glacier.jpg?w=300
23+
24+Here are some base URLs, with their intrinsic sizes and aspect ratios:
25+
26+https://i.zr.io/ri/i/above-trees.jpg 2400x3200 3:4
27+https://i.zr.io/ri/i/above-trees_orig.jpg 6048x8064 3:4
28+https://i.zr.io/ri/i/glacier.jpg 2400x3600 2:3
29+https://i.zr.io/ri/i/horse.jpg 2400x3600 2:3
30+https://i.zr.io/ri/i/komodo-island.jpg 2400x3226 1200:1613
31+https://i.zr.io/ri/i/lake-town.jpg 2400x3598 1200:1799
32+https://i.zr.io/ri/i/pearl-tower.jpg 2400x3600 2:3
33+https://i.zr.io/ri/i/sahara.jpg 2400x1600 3:2
34+https://i.zr.io/ri/i/santorini.jpg 2400x3600 2:3
35+https://i.zr.io/ri/i/snowy-trees.jpg 2400x1797 800:599
36+https://i.zr.io/ri/i/woman.jpg 2400x3600 2:3
