Image Transfer

projects_IT-main1.png

projects_IT-main2.png

projects_IT-main3.png

The Image Transfer mode allows you to select an image and transmit it over BLE. The interface also offers a number of additional features for advanced users.

Data Format

Image data is sent from over BLE in the following format:

  • Single byte char “!” (0x21)
  • Single byte char 'I' (0x49)
  • Color space (uint8 16 for 16bits 565 or 24 for 24-bit 888)
  • Image width (uint16 little endian, 2 bytes)
  • Height (uint16 little endian, 2 bytes)
  • Pixel data encoded as "RGB 16bit 565” or "RGB 24-bit 888" depending on the Color Space selected
  • Single byte CRC

Choose Image

projects_IT-Choose_Image2b.png

projects_IT-Choose_Image3b.png

Tap the Choose Image button to select an image from your device’s photo library or capture a new one from the camera. After selecting your image, use a pinch gesture to scale it for cropping within the white bounding box.

Color Space

This setting toggles between two color bit-depth settings: 16-bit & 24-bit. This value determines how many bits of data are used to represent each pixel’s color value. A higher value allows for a greater range of colors, but uses more data and time to transfer.

Resolution

projects_IT-Resolution2.png

projects_IT-Resolution3.png

The Resolution setting allow you to choose from a list of preset image resolutions designed to fit common displays. Setting a resolution will update the selected image's pixellation as a preview.

Transfer Mode

projects_IT-Transfer_Mode2.png

projects_IT-Transfer_Mode3.png

The Transfer Mode setting determines how often the app will require a confirmation response from the Bluefruit hardware before sending more data. Tapping the button offers three options:

  • Without Response (fastest, least reliable): App never waits for response before sending more data
  • With Response (slowest, most reliable): App always waits for response to before sending more data
  • Interleaved (customizable, varies): App sends a number of packets w/o response before sending one w response. The default value of 50 offers a nice middle ground between speed and reliability.
Example code written for Circuit Playground Bluefruit + TFT Gizmo is only compatible with default Transfer Mode of Interleaved [50:1]

Rotate & Send

The image can be rotated using the buttons on either side of the Send Image button.

Pressing Send Image will present a progress bar and begin sending data to the Bluefruit Hardware.

This guide was first published on Feb 20, 2015. It was last updated on Feb 20, 2015. This page (Image Transfer) was last updated on Dec 05, 2019.