Skip to content

Commit

Permalink
Add support for RGBE Radiance input, requires global libvips #4316
Browse files Browse the repository at this point in the history
  • Loading branch information
florentzabera authored and lovell committed Jan 21, 2025
1 parent ae5ba70 commit 67ff930
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/public/humans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,6 @@ GitHub: https://github.com/calebmer

Name: Don Denton
GitHub: https://github.com/happycollision

Name: Florent Zabera
GitHub: https://github.com/florentzabera
4 changes: 4 additions & 0 deletions docs/src/content/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Requires libvips v8.16.0
[#4207](https://github.com/lovell/sharp/pull/4207)
[@calebmer](https://github.com/calebmer)

* Add support for RGBE images. Requires libvips compiled with radiance support.
[#4316](https://github.com/lovell/sharp/pull/4316)
[@florentzabera](https://github.com/florentzabera)

## v0.33 - *gauge*

Requires libvips v8.15.3
Expand Down
3 changes: 3 additions & 0 deletions src/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ namespace sharp {
case ImageType::FITS: id = "fits"; break;
case ImageType::EXR: id = "exr"; break;
case ImageType::JXL: id = "jxl"; break;
case ImageType::RAD: id = "rad"; break;
case ImageType::VIPS: id = "vips"; break;
case ImageType::RAW: id = "raw"; break;
case ImageType::UNKNOWN: id = "unknown"; break;
Expand Down Expand Up @@ -296,6 +297,8 @@ namespace sharp {
{ "VipsForeignLoadOpenexr", ImageType::EXR },
{ "VipsForeignLoadJxlFile", ImageType::JXL },
{ "VipsForeignLoadJxlBuffer", ImageType::JXL },
{ "VipsForeignLoadRadFile", ImageType::RAD },
{ "VipsForeignLoadRadBuffer", ImageType::RAD },
{ "VipsForeignLoadVips", ImageType::VIPS },
{ "VipsForeignLoadVipsFile", ImageType::VIPS },
{ "VipsForeignLoadRaw", ImageType::RAW }
Expand Down
1 change: 1 addition & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ namespace sharp {
FITS,
EXR,
JXL,
RAD,
VIPS,
RAW,
UNKNOWN,
Expand Down
2 changes: 1 addition & 1 deletion src/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Napi::Value format(const Napi::CallbackInfo& info) {
Napi::Object format = Napi::Object::New(env);
for (std::string const f : {
"jpeg", "png", "webp", "tiff", "magick", "openslide", "dz",
"ppm", "fits", "gif", "svg", "heif", "pdf", "vips", "jp2k", "jxl"
"ppm", "fits", "gif", "svg", "heif", "pdf", "vips", "jp2k", "jxl", "rad"
}) {
// Input
const VipsObjectClass *oc = vips_class_find("VipsOperation", (f + "load").c_str());
Expand Down

0 comments on commit 67ff930

Please sign in to comment.