Skip to content
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: 5 additions & 2 deletions tracer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/python
#Run pip install scipy==1.1.0 because for higher versions of scipy it genrates AttributeError: module 'scipy.misc' has no attribute 'imread'
## Try running on Ubuntu or other linux based OS because windows generates and error of ModuleNotFoundError: No module named '_curses'
##So dont waste time if you encounter these errors just follow above steps :)

import numpy as np
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -313,7 +316,7 @@ def rgbtosrgb(arr):
arr[mask] **= 1/2.4
arr[mask] *= 1.055
arr[mask] -= 0.055
arr[-mask] *= 12.92
arr[~mask] *= 12.92 # TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead


# convert from srgb to linear rgb
Expand All @@ -323,7 +326,7 @@ def srgbtorgb(arr):
arr[mask] += 0.055
arr[mask] /= 1.055
arr[mask] **= 2.4
arr[-mask] /= 12.92
arr[~mask] /= 12.92 # TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead


logger.debug("Loading textures...")
Expand Down