png
This commit is contained in:
12
README.md
12
README.md
@@ -33,7 +33,7 @@ ESP32-S3 works as a Wi-Fi REST controller and replaces Android App logic:
|
||||
- `GET /v1/printer/status`
|
||||
- Print:
|
||||
- `POST /v1/print/raster`
|
||||
- `POST /v1/print/image` (direct JPEG binary upload, no base64)
|
||||
- `POST /v1/print/image` (direct PNG binary upload, no base64)
|
||||
- `POST /v1/print/qr`
|
||||
- `POST /v1/print/text`
|
||||
- `POST /v1/print/receipt`
|
||||
@@ -121,7 +121,7 @@ The page provides:
|
||||
- health/status check
|
||||
- connect/disconnect printer
|
||||
- submit a simple text print job
|
||||
- upload a JPG image (binary payload) and let ESP32-S3 decode/threshold/scale/raster conversion
|
||||
- upload a PNG image (binary payload) and let ESP32-S3 decode/threshold/scale/raster conversion
|
||||
- view jobs list
|
||||
|
||||
If API key is enabled, input it in the page before invoking actions.
|
||||
@@ -163,11 +163,11 @@ curl -X POST http://<esp-ip>/v1/print/raster \
|
||||
}'
|
||||
```
|
||||
|
||||
### Image print (direct JPG upload, no base64)
|
||||
### Image print (direct PNG upload, no base64)
|
||||
```bash
|
||||
curl -X POST 'http://<esp-ip>/v1/print/image?scale_to_width=1&threshold=160&invert=0&max_height=2200&density=medium' \
|
||||
-H 'Content-Type: image/jpeg' \
|
||||
--data-binary @./sample.jpg
|
||||
-H 'Content-Type: image/png' \
|
||||
--data-binary @./sample.png
|
||||
```
|
||||
|
||||
Request constraints:
|
||||
@@ -305,7 +305,7 @@ curl -X POST http://<esp-ip>/v1/voice/session/stop
|
||||
|
||||
- BLE side is central/client role, not printer peripheral role.
|
||||
- `base64_msb_1bpp` uses Android-compatible bit order (MSB first).
|
||||
- `/v1/print/image` accepts raw `image/jpeg` bytes directly (no base64 wrapper).
|
||||
- `/v1/print/image` accepts raw `image/png` bytes directly (no base64 wrapper).
|
||||
- Large buffers for image upload/decode prefer PSRAM first, then fallback to internal RAM.
|
||||
- `/v1/print/text` and `/v1/print/receipt` now support UTF-8 Chinese via embedded 16x16 GB2312 glyphs.
|
||||
- Characters outside embedded glyph set are rendered as square fallback boxes.
|
||||
|
||||
Reference in New Issue
Block a user