Skip to content

Add 16-bit PNG and BMP image support with sample inspection UI - #706

Open
supernova-jpg wants to merge 2 commits into
IENT:developfrom
supernova-jpg:feature/16bit-png-image-support
Open

supernova-jpg wants to merge 2 commits into
IENT:developfrom
supernova-jpg:feature/16bit-png-image-support

Conversation

@supernova-jpg

Copy link
Copy Markdown

Summary

YUView previously quantized all image files down to 8-bit RGB upon loading via Qt's standard reader. This PR introduces native high-bit-depth image decoding for:

  • 16-bit PNG images (QImage::Format_Grayscale16 and QImage::Format_RGBA64) with full scanline unfiltering (Sub, Up, Average, Paeth) and IDAT decompression.
  • 48-bit / 64-bit uncompressed BMP images.

Key Additions

  1. Lossless 16-Bit Image Loader:
    • loadImagePreservingHighBitDepth() reads raw 16-bit samples without quantizing to 8-bit.
  2. Analytical Pixel Value Inspection:
    • Pixel value inspection tooltips and difference calculations now show the true high-bit-depth sample values (up to 65535, or scaled to 10-bit 1023).
  3. Properties Widget Integration:
    • Added a bit depth selector (16-bit vs 10-bit mode) in the Image Properties panel of playlistItemImageFile.

Testing & Regressions

  • Tested with 16-bit PNG (grayscale and RGBA) and standard 8-bit PNG/JPEG/BMP files.
  • Standard 8-bit images continue using the fast path with zero performance penalty.

This branch has not been deployed

No deployments
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