Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Add image mode casting #2562

Merged
merged 4 commits into from
Jul 25, 2024
Merged

[FEAT] Add image mode casting #2562

merged 4 commits into from
Jul 25, 2024

Conversation

Vince7778
Copy link
Contributor

Adds the ability to cast between different image modes (at least, the ones that are supported). Also lets you perform this casting upon decode, which allows you to parse unsupported 16-bit images by converting them to 8-bit.

Closes #2495

@Vince7778 Vince7778 requested a review from jaychia July 25, 2024 18:30
@github-actions github-actions bot added the enhancement New feature or request label Jul 25, 2024
Copy link
Contributor

@jaychia jaychia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, let's get the Mode in docs and push this through

daft/expressions/expressions.py Show resolved Hide resolved
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 80.59701% with 39 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@764d2df). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2562   +/-   ##
=======================================
  Coverage        ?   63.37%           
=======================================
  Files           ?      982           
  Lines           ?   109358           
  Branches        ?        0           
=======================================
  Hits            ?    69308           
  Misses          ?    40050           
  Partials        ?        0           
Files Coverage Δ
src/daft-core/src/python/series.rs 93.84% <100.00%> (ø)
src/daft-dsl/src/functions/image/mod.rs 100.00% <100.00%> (ø)
src/daft-dsl/src/python.rs 93.28% <100.00%> (ø)
src/daft-dsl/src/functions/image/decode.rs 57.50% <92.85%> (ø)
daft/series.py 89.69% <85.71%> (ø)
src/daft-core/src/series/ops/image.rs 74.35% <80.95%> (ø)
daft/expressions/expressions.py 93.18% <64.28%> (ø)
src/daft-core/src/array/ops/image.rs 91.48% <85.07%> (ø)
src/daft-dsl/src/functions/image/to_mode.rs 56.41% <56.41%> (ø)

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 25, 2024
@Vince7778 Vince7778 merged commit ad494a6 into main Jul 25, 2024
44 checks passed
@Vince7778 Vince7778 deleted the conor/image-decode-mode branch July 25, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow image.decode() to take in an image mode to create a fixed mode image column
2 participants