Skip to content

Commit

Permalink
Merge pull request #82 from Yu-AnChen/fix-windows-build
Browse files Browse the repository at this point in the history
Fix windows build
  • Loading branch information
thejohnhoffer authored Oct 16, 2024
2 parents a04ef03 + 7e44adf commit a18070f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ dependencies:
- altair=4.2.0
- blas=*=blis # blis build seems to avoid threading deadlocks
- pip=22.3
- pyinstaller==6.10
- pip:
- openslide-python==1.2.0
- pyinstaller==5.13
11 changes: 6 additions & 5 deletions src/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
import json
import argparse
import numpy as np
import skimage as ski
import skimage.io
import skimage.util

def linear_blend(images):
float_images = [
(color, ski.img_as_float(i))
(color, skimage.util.img_as_float(i))
for (_, color, i) in images
]
# Use first channel to define output
Expand All @@ -19,7 +20,7 @@ def linear_blend(images):
float_out += float_color * float_image
# Uint8 output
out = np.clip(float_out, 0, 1)
return ski.img_as_ubyte(out)
return skimage.util.img_as_ubyte(out)

def parse_hex_color(hex_color):
hex_color = hex_color.lstrip('#')
Expand All @@ -33,10 +34,10 @@ def load_json(filename):
return json.load(f)

def load_jpeg(filename):
return ski.io.imread(filename)
return skimage.io.imread(filename)

def save_jpeg(filename, image):
ski.io.imsave(filename, image)
skimage.io.imsave(filename, image)

def to_path_zoom(name):
zoom = name.split('_')[0]
Expand Down

0 comments on commit a18070f

Please sign in to comment.