Skip to content

Drop-in compatibility

For spng_compat to become drop-in compatible the following additional features/functions have to be implemented on top of libspng:

  • Error reporting with setjmp()
  • Reading from a FILE*
  • (Alpha) filler bytes (png_set_filler()).
  • Various alpha blending modes (png_set_alpha_mode()).
  • png_get_pixels_per_inch(), png_get_x/y_offset_inches() and fixed-point equivalents.
  • Extensions: pCAL, sCAL, these require parsing of text.
  • png_set_sig_bytes(), png_sig_cmp().
  • low-level PNG writing functions: png_write_sig(), png_write_chunk(), etc.
  • png_set_shift()
  • png_set_invert_mono()
  • png_set_compression_level() and similar functions.
  • png_get_channels()
  • png_set_rows()
  • png_get/set_image_width/height/bit_depth/color_type/etc()
  • png_get_(x/y)_pixels_per_meter()
  • png_get_pixel_aspect_ratio(_fixed)()
  • png_get_(x/y)_offset_(pixels/microns)()
  • png_get_copyright(), png_get_header_ver(), png_get_header_version(), png_get_libpng_ver().
  • png_permit_mng_features()
  • png_set_user_limits(), etc.
  • png_get_pHYs_dpi()
Edited by Randy
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information