Open sb55555 opened 1 year ago
I don't think the radload
feature is supported at present so we'd need to add it.
Happy to accept a PR, if you're able.
The ImageTypeId
function and loaderToType
map are a couple of places we'd need to do this for Radiance input.
https://github.com/lovell/sharp/blob/844deaf48060d60eb05f3f61c567282e3611f12a/src/common.cc#L234
https://github.com/lovell/sharp/blob/844deaf48060d60eb05f3f61c567282e3611f12a/src/common.cc#L267
For Radiance output, we would need some custom saving logic; perhaps look at the jp2
code for guidance.
System: OS: Linux 5.15 Amazon Linux 2 CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz Memory: 7.44 GB / 15.53 GB Container: Yes Shell: 4.2.46 - /bin/bash Binaries: Node: 16.18.1 - /var/lang/bin/node npm: 8.19.2 - /var/lang/bin/npm npmPackages: sharp: ^0.31.3 => 0.31.3
What are the steps to reproduce?
index.js
Run the below Dockerfile with
docker build -t dev-lambda . --progress plain --no-cache
Dockerfile
What is the expected behaviour?
With a custom build of libvips that enables Rad (Radiance HDR), I expect sharp to be able to resize .hdr files.
Libvips installs says that Radiance HDR is enabled
13 12.96 enable RAD load/save : YES
sharp build from source says that local libvips is found
Im able to resize a Radiance HDR with vips cmdline
but sharp raises an error