Initial scaffold

ober

33bf9eed846ad6e13f7a3d87f815308c3dff2c77

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9d03981
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+dist/
+build/
+target/
+*.log
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..14fac91
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..85d3d99
--- /dev/null
+++ b/README.md
@@ -0,0 +1,36 @@
+# jerboa-image
+
+`jerboa-image` defines the image data contract used by Jerboa apps and Rust/WASM
+helpers.
+
+The first consumer is the SFB SSD reviewer. The goal is to avoid OpenCV and
+NumPy while keeping image operations deterministic and easy to test.
+
+## Image Contract
+
+```json
+{
+  "width": 1224,
+  "height": 1584,
+  "channels": 4,
+  "format": "rgba8",
+  "source": "browser-canvas"
+}
+```
+
+Native helpers may also use `rgb8`; browser/WASM helpers should accept `rgba8`
+directly from Canvas `ImageData`.
+
+## Responsibilities
+
+- RGB/RGBA pixel access.
+- RGB to HSV conversion.
+- Cropping and coordinate transforms.
+- Optional PNG/JPEG decode for native test tools.
+- Optional PNG encode for cached browser assets.
+
+## Dependency Rule
+
+The Android default path must not depend on OpenCV, Qt, MuPDF, Poppler, or
+Python. Rust crates are acceptable when they can build as static CLI tools or
+WASM modules and do not pull GUI stacks.
diff --git a/docs/pixel-contract.md b/docs/pixel-contract.md
new file mode 100644
index 0000000..28ceb38
--- /dev/null
+++ b/docs/pixel-contract.md
@@ -0,0 +1,21 @@
+# Pixel Contract
+
+The SSD detector needs only a small pixel API.
+
+```scheme
+(image-width image)
+(image-height image)
+(image-pixel-r image x y)
+(image-pixel-g image x y)
+(image-pixel-b image x y)
+```
+
+For browser/WASM use, the input is Canvas `ImageData`:
+
+- 4 bytes per pixel.
+- Byte order: R, G, B, A.
+- Row-major.
+- Coordinates are integer source canvas pixels.
+
+For native CLI tests, PNG/JPEG decode can be provided by Rust's `image` crate,
+but that crate is not required at runtime in the Android browser path.