|
10 | 10 | from tiledb.bioimg.converters.png import PNGConverter
|
11 | 11 | from tiledb.bioimg.helpers import open_bioimg
|
12 | 12 | from tiledb.bioimg.openslide import TileDBOpenSlide
|
13 |
| -from tiledb.libtiledb import WebpInputFormat |
| 13 | +from tiledb.filter import WebpFilter |
14 | 14 |
|
15 | 15 |
|
16 | 16 | def create_synthetic_image(
|
@@ -125,8 +125,8 @@ def compare_png(p1: Image, p2: Image, lossless: bool = True):
|
125 | 125 | "compressor, lossless",
|
126 | 126 | [
|
127 | 127 | (tiledb.ZstdFilter(level=0), True),
|
128 |
| - (tiledb.WebpFilter(WebpInputFormat.WEBP_RGB, lossless=True), True), |
129 |
| - (tiledb.WebpFilter(WebpInputFormat.WEBP_NONE, lossless=True), True), |
| 128 | + (tiledb.WebpFilter(WebpFilter.WebpInputFormat.WEBP_RGB, lossless=True), True), |
| 129 | + (tiledb.WebpFilter(WebpFilter.WebpInputFormat.WEBP_NONE, lossless=True), True), |
130 | 130 | ],
|
131 | 131 | )
|
132 | 132 | @pytest.mark.parametrize(
|
@@ -196,7 +196,7 @@ def test_png_converter_L_roundtrip(
|
196 | 196 | @pytest.mark.parametrize(
|
197 | 197 | "compressor, lossless",
|
198 | 198 | [
|
199 |
| - (tiledb.WebpFilter(WebpInputFormat.WEBP_RGB, lossless=False), False), |
| 199 | + (tiledb.WebpFilter(WebpFilter.WebpInputFormat.WEBP_RGB, lossless=False), False), |
200 | 200 | ],
|
201 | 201 | )
|
202 | 202 | def test_png_converter_RGB_roundtrip_lossy(
|
@@ -235,8 +235,8 @@ def test_png_converter_RGB_roundtrip_lossy(
|
235 | 235 | "compressor, lossless",
|
236 | 236 | [
|
237 | 237 | (tiledb.ZstdFilter(level=0), True),
|
238 |
| - (tiledb.WebpFilter(WebpInputFormat.WEBP_RGBA, lossless=True), True), |
239 |
| - (tiledb.WebpFilter(WebpInputFormat.WEBP_NONE, lossless=True), True), |
| 238 | + (tiledb.WebpFilter(WebpFilter.WebpInputFormat.WEBP_RGBA, lossless=True), True), |
| 239 | + (tiledb.WebpFilter(WebpFilter.WebpInputFormat.WEBP_NONE, lossless=True), True), |
240 | 240 | ],
|
241 | 241 | )
|
242 | 242 | def test_png_converter_RGBA_roundtrip(
|
@@ -266,7 +266,10 @@ def test_png_converter_RGBA_roundtrip(
|
266 | 266 | @pytest.mark.parametrize(
|
267 | 267 | "compressor, lossless",
|
268 | 268 | [
|
269 |
| - (tiledb.WebpFilter(WebpInputFormat.WEBP_RGBA, lossless=False), False), |
| 269 | + ( |
| 270 | + tiledb.WebpFilter(WebpFilter.WebpInputFormat.WEBP_RGBA, lossless=False), |
| 271 | + False, |
| 272 | + ), |
270 | 273 | ],
|
271 | 274 | )
|
272 | 275 | def test_png_converter_RGBA_roundtrip_lossy(
|
|
0 commit comments