Daft icon indicating copy to clipboard operation
Daft copied to clipboard

fix: Allow PNGs to be displayed notebooks

Open desmondcheongzx opened this issue 8 months ago • 1 comments

Changes Made

When we generate thumbnails to display in notebooks, we encoded them as JPEG by default. This does not work if images have an alpha channel.

This PR changes it so that we generate PNGs instead. This should have minimal performance impact because we're generating small 128x128 thumbnails and this only happens when previewing a small amount (typically <= 8) of results in a notebook.

Related Issues

Closes #4072

desmondcheongzx avatar Apr 26 '25 00:04 desmondcheongzx

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.49%. Comparing base (d8535df) to head (40174a4). Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/daft-image/src/ops.rs 0.00% 2 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4255   +/-   ##
=======================================
  Coverage   78.48%   78.49%           
=======================================
  Files         798      798           
  Lines      105351   105375   +24     
=======================================
+ Hits        82687    82712   +25     
+ Misses      22664    22663    -1     
Files with missing lines Coverage Δ
src/daft-image/src/ops.rs 85.71% <0.00%> (ø)

... and 10 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 26 '25 02:04 codecov[bot]