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

Add option to ignore color palette in TIFF images #589

Merged
merged 4 commits into from
Apr 11, 2022

Conversation

gnodar01
Copy link
Contributor

@gnodar01 gnodar01 commented Apr 8, 2022

getImageFromIFD will automatically create a 16 bit RGB if there if a tiff is of type 3. This makes sense most times, but occasionally, we need the raw single channel greyscale image.

add option flag to ignore the color table in type 3 TIF images that have
indexed colors, returning index values as single channel, greyscale
image instead of psuedo-colored, 3 channel RGB
Add option to ignore palette in TIF
@targos targos enabled auto-merge (squash) April 9, 2022 06:01
@targos targos disabled auto-merge April 9, 2022 06:01
Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

index.d.ts Outdated Show resolved Hide resolved
- reuse palette in test table, with options
- conditionally load with options
@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #589 (0b3fe06) into legacy (0060679) will decrease coverage by 0.03%.
The diff coverage is 72.22%.

@@            Coverage Diff             @@
##           legacy     #589      +/-   ##
==========================================
- Coverage   83.61%   83.58%   -0.04%     
==========================================
  Files         163      163              
  Lines        5597     5603       +6     
  Branches     1394     1397       +3     
==========================================
+ Hits         4680     4683       +3     
- Misses        817      820       +3     
  Partials      100      100              
Impacted Files Coverage Δ
src/image/core/load.js 74.81% <68.75%> (-1.16%) ⬇️
test/common.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0060679...0b3fe06. Read the comment docs.

@gnodar01
Copy link
Contributor Author

Can you please add a test to https://github.com/image-js/image-js/blob/legacy/src/image/core/__tests__/loadTIFF.js ?

Done. Not sure I understand what's going on with the code coverage, but if there's something I can do just let me know. Thanks!

@targos targos enabled auto-merge (squash) April 11, 2022 09:46
@targos targos disabled auto-merge April 11, 2022 09:54
@targos targos merged commit 07aa7d5 into image-js:legacy Apr 11, 2022
@targos
Copy link
Member

targos commented Apr 11, 2022

Thanks!

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.

None yet

2 participants