Post images (like jskom) #33

Closed
opened 2026-10-17 06:37:32 +00:00 by littlefox · 1 comment
Owner

jskom (textform.html, imageService.resizeImage) lets you pick an image (camera on phones), scales it down in a canvas to JPEG at 0.85 quality, and posts it as a text with content-type image/jpeg. NeoKOM can show cat pictures but not post them.

  • Browser: file input, scaled in a canvas.
  • Desktop: file picker, scaled with the image crate.
  • Body is the image bytes, aux 1 is the type, and mx-mime-file-name (10104) holds the original file name. Elisp does the same for imported attachments.
  • Size limit before sending. lyskomd's max text size is in get-info / max-text-length.

Refs #13.

jskom (textform.html, imageService.resizeImage) lets you pick an image (camera on phones), scales it down in a canvas to JPEG at 0.85 quality, and posts it as a text with content-type `image/jpeg`. NeoKOM can show cat pictures but not post them. - Browser: file input, scaled in a canvas. - Desktop: file picker, scaled with the `image` crate. - Body is the image bytes, aux 1 is the type, and mx-mime-file-name (10104) holds the original file name. Elisp does the same for imported attachments. - Size limit before sending. lyskomd's max text size is in get-info / `max-text-length`. Refs #13.
Author
Owner

Merged via PR #37. Verified: e2e post-image.spec.ts covers a small PNG kept as is, a 2400×1800 PNG scaled to a JPEG that fits, a caption giving multipart, and removing the image. The devserver test text_limit_is_learnt checks string-too-long status = 131072 and that an image of exactly the budget fits. CI run #49 is green. Not verified: the desktop file dialog.

Merged via PR #37. Verified: e2e post-image.spec.ts covers a small PNG kept as is, a 2400×1800 PNG scaled to a JPEG that fits, a caption giving multipart, and removing the image. The devserver test text_limit_is_learnt checks string-too-long status = 131072 and that an image of exactly the budget fits. CI run #49 is green. Not verified: the desktop file dialog.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
littlefox/neokom#33
No description provided.