Skip to content

Printer Prepare For Image

James Sutton edited this page Jan 13, 2017 · 2 revisions

Prepare for Image command

This command is sent just before the command that actually sends the image, it contains the format, options and size of the upcoming payload.

Command Code: 81

Example Command Payload

  1. Image Format
  2. Image Options
  • If does not contain FUJIFILMOPTION: 0
  • If contains CLEARALL, start as 16 else 0
  • If contains FORCEPRT i |= 32
  • If contains NOREPRINT i |= 64
  • If contains NOSAVE i |= 128

int indexOf = toUpperCase.indexOf("LUT"); if (indexOf != -1) { int parseInt; try { parseInt = Integer.parseInt(toUpperCase.substring(indexOf + 3, indexOf + 4)); } catch (NumberFormatException e) { parseInt = 0; } i |= parseInt; ```

  • However, only NOREPRINT and NOSAVE are used in the app
  1. Image Payload Length

10 80 0015f900

0000003a0000ea60fb700d0a

Byte Description Hex Notes
Payload
Byte 1 Image Format 10 1, 2 or 16: 16(dec)
Byte 2 Image Options 80 64 or 128: 128 (dec)
Byte 3 Length MSB 24 00 Picture Payload Length: 1440000 (dec)
Byte 4 Length MSB 16 15
Byte 5 Length MSB 8 f9
Byte 6 Length LSB 00
Byte 7 00 Unused.
Byte 8 00
Byte 9 00
Byte 10 00
Byte 11 00
Byte 12 00

Example Response

If the response is 20 bytes long, then the value returned should be 480, otherwise, bytes 18 and 19 should be extracted.

Byte Description Hex Notes
Payload
Byte 12 Return Code 00 See [Return Codes](https://github.com/jpwsutton/instax_api/wiki/Return-Codes)
Byte 13 00 Unknown..
Byte 14 00 Unknown..
Byte 15 3a Unknown..
Byte 16 00
Byte 17 00
Byte 18 ea Two Byte Int: 60000 (dec)
Byte 19 60