[sane-devel] SANE_FRAME_IR

Benjamin Gordon bmgordon at chromium.org
Fri Jul 24 00:57:50 BST 2026


On Thu, Jul 23, 2026 at 5:31 PM Alexander Pevzner <pzz at apevzner.com> wrote:

> On 7/23/26 2:20 AM, Benjamin Gordon wrote:
> > If there's the possibility of re-opening the standard, I for one would
> > like to consider a more general handling of frame formats.  All the
> > scanners that support eSCL these days can return JPEG directly, and some
> > of them can even return a whole PDF at once.  It would be great for the
> > frontend to be able to negotiate some sort of passthrough mode instead
> > of decoding these and then re-encoding in the frontend.
> I would prefer to have an option that allows to negotiate returned
> format in terms of MIME types (with some MIME type reserved to the
> standard SANE frame format).
>

Agreed, and that's also what I had in mind.  For example, if we reserved
"-sane-*" for this type of negotiation (which wouldn't conflict with
existing options because a leading dash is currently illegal), then there
could be a -sane-image-formats-supported option containing a list of MIME
types that the backend could return.  The default would have to be some
entry that corresponded to the existing frame formats.  Then any frontend
that didn't know about this option would get the same data it's expecting
now and any backend that didn't offer this option would implicitly tell the
frontend to expect the traditional formats.  There's definitely details to
be worked out, but I think this type of scheme would allow a lot of
extensions without an ABI break and without forcing either side to upgrade.

Please notice, sane_get_parameters cannot be implemented (or should just
> return requested, not the actual image parameters) if this option is
> active, because sane_get_parameters may require at least partial
> decoding of the image, returned by the scanner.
>

Agreed again, but this sort of behavior change would be OK as long as both
sides have opted in through that initial negotiation.

Thanks,
Benjamin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20260723/6dbccad5/attachment-0001.htm>


More information about the sane-devel mailing list