Skip to content

Conversation

@ivancmz
Copy link

@ivancmz ivancmz commented Oct 2, 2025

This commit introduces a unified decoder interface that supports multiple image formats (WebP, JPEG, PNG, BMP, and GIF) in addition to the existing WebP support. The implementation provides a consistent API regardless of the underlying image format, enabling PanelPlayer to handle a wider variety of media sources.

Changes:

  • Add decoder.h: Define generic decoder interface with format-agnostic API
  • Add decoder.c: Implement automatic format detection and decoding for WebP, JPEG, PNG, BMP and GIF formats
  • Update main.c: Replace direct WebP API calls with new decoder abstraction
  • Update makefile: Add linker flags for libjpeg, libpng, and libgif
  • Update readme.md: Document required dependencies and supported formats

The decoder automatically detects the image format based on file headers and handles both static images (JPEG, PNG) and animations (WebP, GIF) through a unified interface. This maintains backward compatibility while extending format support.

Dependencies:

  • libwebp-dev (existing)
  • libjpeg-dev (new)
  • libpng-dev (new)
  • libgif-dev (new)

This commit introduces a unified decoder interface that supports multiple
image formats (WebP, JPEG, PNG, BMP, and GIF) in addition to the existing WebP
support. The implementation provides a consistent API regardless of the
underlying image format, enabling PanelPlayer to handle a wider variety
of media sources.

Changes:
- Add decoder.h: Define generic decoder interface with format-agnostic API
- Add decoder.c: Implement automatic format detection and decoding for
  WebP, JPEG, PNG, BMP and GIF formats
- Update main.c: Replace direct WebP API calls with new decoder abstraction
- Update makefile: Add linker flags for libjpeg, libpng, and libgif
- Update readme.md: Document required dependencies and supported formats

The decoder automatically detects the image format based on file headers
and handles both static images (JPEG, PNG) and animations (WebP, GIF)
through a unified interface. This maintains backward compatibility while
extending format support.

Dependencies:
- libwebp-dev (existing)
- libjpeg-dev (new)
- libpng-dev (new)
- libgif-dev (new)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant