[sane-standard] clarification on the standard, specifically frames

Johannes Berg johannes@sipsolutions.net
Fri, 22 Oct 2004 17:40:40 +0200


--=-Z0xfzYQx3wg4p+D/6K1K
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello,

Assume the following situation:
I have a digital camera that I want to have a SANE backend for, and it
can give me -- for each image -- extra information like the shutter
speed, date&time, "Blende" [sorry, no English word for that in my
vocabulary] etc.
Let text/x-camera-info be the MIME type of a format capable of holding
such information (in textual form).
Let each image acquired contain 3 colour channels: red,green,blue.

Would my backend now first transmit a frame of type SANE_FRAME_MIME with
the information about the image, with SANE_PFLAG_LAST_FRAME set to 0,
and then a second SANE_FRAME_RAW with SANE_PFLAG_LAST_FRAME set to 1,
continuing with the next image in further sane_read calls? [or of
course, the other way around, first the raw data and then the mime
stuff]
However, the standard specifies that SANE_PFLAG_LAST_FRAME MUST be set
when transmitting a MIME frame, so does that mean I have to transmit the
RGB data first?

Also, would SANE_PFLAG_MORE_IMAGES be set during the transfer of both
frames, or would it be set only during the second frame?
[But as I understand the specification it can basically always be set,
unless it can be guaranteed that it is impossible to acquire more data
after the current frame]

johannes

--=-Z0xfzYQx3wg4p+D/6K1K
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Comment: Johannes Berg (SIP Solutions)

iQIVAwUAQXkp9KVg1VMiehFYAQIymQ/+OkyG+b1+RhWSs0N4hXMEX3syPezFfGl4
p4vxTDOUxcj2paMBlfQZSCsurObOkuc0uZf30l75DFlTInTS04QCaMc6Ux8CUMd5
qLFgVdLM+7qRhlXbkLCSuk8sHR5BRb+uP3gKIkexlIb63gWV3VBwbFjoabTAxYml
Mt7JN7//hEQxVeTu7oDAf8NVmtzHmwnsJpsj21l/0RpB4Bm/qWppZqnRgoKXCBgj
Jm18MsE+nmQheajZ8B7b6HxsyFsjAdnUbAg5mtEjQ8MbiCL+77aPilDYfbLXILL1
Ah1hXPKl8M05sJ9QRrPbu+QMmIRyexmA1XFgfHeTWL9Guu5hwmLybz68pnD/Mpd7
DLCxFK8nFbXxAdJHy78u2ffPUX/Jn4m8Mzz+gaGL0oI8IyKz5V089ivO4sjbu/pX
rklANdmLpHpP0kQbVNhbu6/2/SWIns0tvrM7u/B8qQPkZNaAPc00EXM/GxR6NOMj
k5o3AvfLNl8kSq26elWrYSaFfaw5XN6PHzopzAXRBg6Ylr3P3uD7HmJ9B1l1kXDY
EFWBCBQ602hkHUbdpDaC+UKrLKtTkqkN5GKOHP5Iks5h7Ol6ltpSWVWyyEbqS954
SaqKNOkpmgAM3I94oQpQVtMl+YDdxxMUFqvNE9if7LA5dnSErMHnB+5fRK6MR6gl
a7QxMtSkCFU=
=oP6s
-----END PGP SIGNATURE-----

--=-Z0xfzYQx3wg4p+D/6K1K--