<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 3, 2025 at 11:36 PM <sane-devel@symme.link> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jun 03, 2025 at 10:00:45PM -0700, Ralph Little wrote:<br>
> On Tue, Jun 3, 2025 at 9:54 PM James Ring <<a href="mailto:sjr@jdns.org" target="_blank">sjr@jdns.org</a>> wrote:<br>
> > On Tue, Jun 3, 2025 at 9:46 PM Ralph Little <<a href="mailto:skelband@gmail.com" target="_blank">skelband@gmail.com</a>> wrote:<br>
> >> Someone has asked the question about byte order in multi-byte image data<br>
> >> that we might get from a SANE backend.<br>
<br>
Hi, it's me, I had the question.<br>
<br>
> >> It is not enough to assume the local machine byte order since we may get<br>
> >> data through the net backend from a remote machine with a different byte<br>
> >> order.<br>
<br>
The `net` backend explicitly swaps to local machine byte order:<br>
<a href="https://gitlab.com/sane-project/backends/-/blob/master/backend/net.c?ref_type=heads#L2356-2362" rel="noreferrer" target="_blank">https://gitlab.com/sane-project/backends/-/blob/master/backend/net.c?ref_type=heads#L2356-2362</a><br>
<br>
So, it does seem like the de facto standard is that backends produce<br>
data in local machine byte order.<br>
<br>
(The protocol documentation reinforces this as a standard:<br></blockquote><div><br></div><div>Agreed. Perhaps this is something we should add to the SANE API specification?</div><div>Allan, do you concur?</div><div><br></div><div>Cheers,</div><div>Ralph</div></div></div>
</div>