You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JPEG XL encoder v0.11.1 0.11.1 [NEON]
Usage: cjxl INPUT OUTPUT [OPTIONS...]
INPUT
the input can be JXL, PPM, PNM, PFM, PAM, PGX, PNG, APNG, GIF, JPEG, EXR
Use '-'for input from stdin.
OUTPUT
the compressed JXL output file
Use '-'for output to stdout
我使用 python可以批量处理:
defconvert_jpeg_to_jxl(jpeg_data):
""" Convert JPEG data to JXL using a subprocess for the cjxl command-line tool. Returns the JXL binary data. """try:
process=subprocess.run(
["cjxl", "-", "-"], # No need for -d 0 for JPEG, as cjxl defaults to lossless for JPEGinput=jpeg_data,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=True
)
returnprocess.stdoutexceptsubprocess.CalledProcessErrorase:
print(f"Error converting JPEG to JXL: {e.stderr.decode()}")
returnNone
The text was updated successfully, but these errors were encountered:
能否像 libjxl 一样提供二进制输入和输出支持?这样的话可以减少文件写入和读取,也不用关心路径权限的问题了
cjxl 的参数:
我使用 python可以批量处理:
The text was updated successfully, but these errors were encountered: