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

Fix stretch when min/max value it outside input data type #154

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 6 additions & 10 deletions doc/examples/utilities-examples.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
"""Example showing importing colormaps from on-disk files."""
from trollimage import utilities as tu


#
# Examples: importing colormaps
#
filename='setvak.rgb'
# Examples: importing colormaps
filename = 'setvak.rgb'
my_cmap = tu.cmap_from_text(filename)
print(my_cmap.colors)
my_cmap_norm = tu.cmap_from_text(filename, norm=True)
print(my_cmap_norm.colors)
my_cmap_transp = tu.cmap_from_text(filename,norm=True, transparency=True)
my_cmap_transp = tu.cmap_from_text(filename, norm=True, transparency=True)
print(my_cmap_transp.colors)
filename='hrv.rgb'
my_cmap_hex = tu.cmap_from_text(filename,hex=True)
filename = 'hrv.rgb'
my_cmap_hex = tu.cmap_from_text(filename, hex=True)
print(my_cmap_hex.colors)

#
# Example: converting PIL to trollimage.Image
#
image = "pifn.png"
timage = tu.pilimage2trollimage(image)