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

Added External Colormap #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pyninjotiff/ninjotiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,12 @@ def _eval_or_default(key, eval_func, default):
reverse = False
if np.iinfo(image_data.dtype).bits == 8:
# Always generate colormap for 8 bit gray scale.
cmap = _default_colormap(reverse)
cmap = kwargs.get("color_map", None)
if cmap is not None:
#cmap = [x * 256 for x in cmap] * 3
Copy link
Member

Choose a reason for hiding this comment

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

This line isn't needed, right?

cmap = [cmap] * 3
else:
cmap = _default_colormap(reverse)
elif reverse:
# No colormap for 16 bit gray scale, but for IR, specify white is
# minimum.
Expand Down