Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Cahute 0.6
Logo
Cahute 0.6
  • Installation guides
    • Installing Cahute on Linux distributions
    • Installing Cahute on macOS / OS X
    • Installing Cahute on Microsoft Windows
    • Installing Cahute on AmigaOS
  • Build from source guides
    • Building Cahute for Linux distributions
    • Building Cahute for macOS / OS X
    • Building Cahute for Microsoft Windows
    • Building Cahute for AmigaOS
  • Contribution guides
    • Contributing to Cahute
    • Reporting a bug or vulnerability
    • Requesting a feature
    • Packaging Cahute
    • Creating a merge request
  • Command line user guides
    • Getting information regarding a calculator
    • Sending a file to a calculator’s storage memory
    • Getting a file from the calculator’s storage memory
    • Displaying the screen from a calculator
  • Developer guides
    • Building with the Cahute library
    • Using device detection
      • Listing calculators connected by USB
      • Listing available serial ports
    • Using links
      • Opening a link to a calculator connected by USB
      • Opening a generic link to a calculator connected by serial
    • Reading and writing files
      • Guessing the type of a file
    • Using text conversion utilities
      • Converting text from an encoding to another
  • Miscellaneous guides
    • Getting started with Cahute in Visual Studio
    • Capturing USB communications on Windows using Wireshark
  • Data formats
    • Number formats
    • Picture formats
    • Text encodings
    • File formats
      • fx-CG add-ins
      • fx-9860G add-ins
      • Calculator Text Format (CTF)
      • CASIOLINK archives
      • casrc configuration file
      • Catalog files (CAT)
      • e-Activity files
      • fx-CG f-key files
      • fx-9860G f-key files
      • FX Program (FXP)
      • GraphCard file format
      • fx-CG language files
      • fx-9860G language files
      • Main memory archives
      • fx-CG picture
      • fx-CP picture
  • Communication protocols
    • Rationales behind the communication protocols
    • Transport medium and protocols
    • USB detection for CASIO calculators
    • CASIOLINK protocols – Serial protocols used by pre fx-9860G calculators
    • CAS40 protocol – Serial protocol used by pre-1996 calculators
      • CAS40 packet format
      • CAS40 data types
      • CAS40 flows
    • CAS50 protocol – Serial protocol used by calculators from 1996 to 2004
      • CAS50 packet format
      • CAS50 data types
      • CAS50 flows
    • CAS100 protocol – Serial protocol used by AFX / Graph 100
      • CAS100 packet format
      • CAS100 data types
      • CAS100 flows
    • CAS300 – Serial and USB protocol used by Classpad 300 / 330 (+)
      • CAS300 packet format
      • CAS300 commands
      • CAS300 flows
    • Protocol 7.00 – Serial and USB protocol used by post fx-9860G calculators
      • Specific formats for Protocol 7.00
      • Protocol 7.00 packet format
      • Protocol 7.00 communication flows
      • Known Protocol 7.00 commands by CASIO
      • Known Protocol 7.00 command extensions in fxRemote
      • Protocol 7.00 use cases
      • Known hardware identifiers for Protocol 7.00
    • Protocol 7.00 Screenstreaming – fx-9860G and fx-CG screenstreaming
      • Protocol 7.00 Screenstreaming packet format
      • Protocol 7.00 Screenstreaming communication flows
    • USB Mass Storage (UMS)
  • Cahute features
    • System compatibility
    • Contexts
    • Links and mediums
    • Files
    • Main memory data
    • Logging facilities
  • Cahute internals
    • Internal compatibility utilities
    • Links and medium internals
    • File internals
    • Characters, encodings and conversions
  • Command line reference
    • CaS command-line reference
    • p7 command line reference
    • p7os command line reference
    • p7screen command line reference
    • xfer9860 command line reference
  • Header reference
    • <cahute.h> – Main header for Cahute
      • <cahute/cdefs.h> – Basic definitions for Cahute
      • <cahute/config.h> – Cahute configuration details
      • <cahute/context.h> – Context management for Cahute
      • <cahute/data.h> – Calculator data resource and methods for Cahute
      • <cahute/detection.h> – Device detection for Cahute
      • <cahute/error.h> – Error definitions for Cahute
      • <cahute/file.h> – File related utilities for Cahute
      • <cahute/link.h> – Calculator link resource and methods for Cahute
      • <cahute/logging.h> – Logging control for Cahute
      • <cahute/path.h> – Path related utilities for Cahute
      • <cahute/picture.h> – Picture format related utilities for Cahute
      • <cahute/text.h> – Text encoding related utilities for Cahute
  • CMake setting reference
  • Project management
    • Project governance
    • Git and release versioning
    • Community feedback
    • Contribution style
    • Coding style
Back to top

<cahute/picture.h> – Picture format related utilities for Cahute¶

Macro definitions¶

CAHUTE_PICTURE_FORMAT_* are constants representing how a given picture’s data is encoded.

CAHUTE_PICTURE_FORMAT_1BIT_MONO¶

Constant representing the 1bpp monochrome picture format.

CAHUTE_PICTURE_FORMAT_1BIT_MONO_CAS50¶

Constant representing the 1bpp monochrome picture format with CAS50 order.

CAHUTE_PICTURE_FORMAT_1BIT_DUAL¶

Constant representing the Dual 1bpp gray picture format.

CAHUTE_PICTURE_FORMAT_1BIT_TRIPLE_CAS50¶

Constant representing the Multiple 1bpp picture format with CAS50 order and palette prefix.

CAHUTE_PICTURE_FORMAT_4BIT_RGB_PACKED¶

Constant representing the 4bpp packed RGB picture format.

CAHUTE_PICTURE_FORMAT_16BIT_R5G6B5¶

Constant representing the R5G6B5 picture format.

CAHUTE_PICTURE_FORMAT_32BIT_ARGB_HOST¶

Constant representing the 32bpp ARGB picture format using host endianness.

Type definitions¶

struct cahute_frame¶

Screenstreaming frame details for screenstreaming.

int cahute_frame_width¶

Width of the frame, in pixels.

int cahute_frame_height¶

Height of the frame, in pixels.

int cahute_frame_format¶

Format of the frame, as a CAHUTE_PICTURE_FORMAT_* constant. See <cahute/picture.h> – Picture format related utilities for Cahute for more information.

cahute_u8 const *cahute_frame_data¶

Frame contents encoded with the format described above.

Function declarations¶

int cahute_convert_picture(cahute_context *context, void *dest, int dest_format, void const *src, int src_format, int width, int height)¶

Convert picture data from a source to a destination format.

Parameters:
  • context – Context in which to run the function.

  • dest – Destination picture data.

  • dest_format – Format to write picture data in on the destination.

  • src – Source picture data.

  • src_format – Format of the source picture data.

  • width – Picture width.

  • height – Picture height.

Returns:

Error, or 0 if the operation was successful.

int cahute_convert_picture_from_frame(cahute_context *context, void *dest, int dest_format, cahute_frame const *frame)¶

Convert picture data from a frame to a destination format.

Parameters:
  • context – Context in which to run the function.

  • dest – Destination picture data.

  • dest_format – Format to write picture data in on the destination.

  • frame – Frame to get source picture data and metadata from.

Returns:

Error, or 0 if the operation was successful.

Next
<cahute/text.h> – Text encoding related utilities for Cahute
Previous
<cahute/path.h> – Path related utilities for Cahute
Copyright © 2024, Thomas Touhey
Made with Sphinx and @pradyunsg's Furo
On this page
  • <cahute/picture.h> – Picture format related utilities for Cahute
    • Macro definitions
    • Type definitions
    • Function declarations