Comments (4)
----------------------------- Captured stderr call -----------------------------
Blosc has not been compiled with '(null)' compression support.
Looks like c-blosc has been compiled without support for snappy compression.
FAILED tests/test_imagecodecs.py::test_jpegxl_encode_jpeg
It is possible that the result of the Brunsli repacking is platform or version specific.
from imagecodecs.
Hello,
blosc on openSUSE have been compiled with
-DPREFER_EXTERNAL_SNAPPY=ON \
-DPREFER_EXTERNAL_ZLIB=ON \
-DPREFER_EXTERNAL_ZSTD=ON \
-DPREFER_EXTERNAL_LZ4=ON \
-DBUILD_STATIC=OFF
https://build.opensuse.org/package/view_file/openSUSE:Factory/blosc/blosc.spec?expand=1
Which seems to enable snappy, but is using the PREFER_EXTERNAL flag the good way to do it?
I'm not sure what you meant by Brunsli repacking is platform or version specific, can you expand on that?
Also, I forgot to mention that I apply a patch, to fix zopfli not found and enable other stuff if that make a difference.
diff -ruN a/imagecodecs/_zopfli.c b/imagecodecs/_zopfli.c
--- a/imagecodecs/_zopfli.c 2020-05-31 07:35:37.000000000 +0700
+++ b/imagecodecs/_zopfli.c 2020-08-11 03:02:56.704879851 +0700
@@ -600,7 +600,7 @@
#include "numpy/ufuncobject.h"
#include <stdint.h>
#include <stdlib.h>
-#include "zopfli/zopfli.h"
+#include "zopfli.h"
#include "pythread.h"
#include "pystate.h"
#ifdef _OPENMP
diff -ruN a/imagecodecs/zopfli.pxd b/imagecodecs/zopfli.pxd
--- a/imagecodecs/zopfli.pxd 2020-02-19 04:42:45.000000000 +0700
+++ b/imagecodecs/zopfli.pxd 2020-08-09 12:44:01.322834958 +0700
@@ -4,7 +4,7 @@
# Cython declarations for the `Zopfli 1.0.3` library.
# https://github.com/google/zopfli
-cdef extern from 'zopfli/zopfli.h':
+cdef extern from 'zopfli.h':
ctypedef struct ZopfliOptions:
int verbose
diff -ruN a/setup.py b/setup.py
--- a/setup.py 2020-05-31 06:50:56.000000000 +0700
+++ b/setup.py 2020-08-09 12:41:15.565268379 +0700
@@ -148,13 +148,13 @@
import platform
del EXTENSIONS['jpeg12'] # jpeg12 requires custom build
- del EXTENSIONS['jpegls'] # CharLS 2.1 library not commonly available
- del EXTENSIONS['jpegxl'] # Brunsli library not commonly available
+ # del EXTENSIONS['jpegls'] # CharLS 2.1 library not commonly available
+ # del EXTENSIONS['jpegxl'] # Brunsli library not commonly available
del EXTENSIONS['lerc'] # LERC library not commonly available
- del EXTENSIONS['zfp'] # ZFP library not commonly available
+ # del EXTENSIONS['zfp'] # ZFP library not commonly available
- if 'arch' in platform.platform():
- del EXTENSIONS['zopfli'] # zopfli/zopfli.h does not exist
+ # if 'arch' in platform.platform():
+ # del EXTENSIONS['zopfli'] # zopfli/zopfli.h does not exist
if sys.platform == 'win32':
EXTENSIONS['bz2']['libraries'] = ['libbz2']
from imagecodecs.
Try to build c-blosc
with -DDEACTIVATE_SNAPPY=OFF
what you meant by Brunsli repacking is platform or version specific
Brunsli encoding works by taking an existing JPEG stream produced by libjpeg(-turbo) and re-packaging it into a JPEG-XL stream. JPEG does not guarantee bit reproducible results and the Brunsli library is at version 0.1 so I think it is reasonable to expect slight differences in the output, which the imagecodecs tests currently do not account for. Just ignore the failure for now or disable the JPEG-XL codec.
As for your patch, the setup.py file currently supports conda-forge, recent Debian/WSL, the imagecodecs CI build system, and my development setup. On other platforms, either patch setup.py or customize the defaults providing your own imagecodecs_distributor_setup.customize_build
function:
Lines 301 to 314 in f38d0d4
from imagecodecs.
I enable snappy in blosc with -DDEACTIVATE_SNAPPY=OFF and disable jpeg-xl codec, the build is now successful.
from imagecodecs.
Related Issues (20)
- NumPy 2.0 support HOT 6
- IMCD_LZW_TABLE_TOO_SMALL exception with large image HOT 6
- Cannot disable bcn extension HOT 4
- codec not available: 'imagecodecs_jpegxl' HOT 2
- aarch64 install HOT 2
- Not get compression ratio of 10:1 HOT 1
- Decode PackBits with padded bytes. HOT 5
- JPEGLS not available under devbox/nix HOT 3
- No multi-component transform for JPEG2000 lossless HOT 3
- Cannot install imagecodecs HOT 3
- Fails to build with libjxl v0.9: use of undeclared identifier 'JXL_DEC_EXTENSIONS' HOT 2
- Cannot set JPEGXL effort lower than 3 in `jpegxl_encode`? HOT 2
- Checking for distributions (Arch in this case) should be done in a more reliable way HOT 2
- Support for RGB + extra channels for JXL encoding HOT 1
- Is there a compiled version of this? HOT 1
- Feature Request: Add JPEG XL Float Support HOT 2
- Not able to install this module HOT 1
- Cannot disable bcn HOT 3
- Error when slicing in zarr array HOT 4
- Feature Request: add Jpegli codec HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagecodecs.