Skip to content

HDR Support #2947

Closed
Closed

Description

@Gatts011

What are you trying to achieve?
Convert HDRI to anything else, libvips supports hdr format

Have you searched for similar feature requests?
Yes

What would you expect the API to look like?

  if (descriptor->rawChannels > 3) {   //channels are more than 3 - hdr has 10 ish?
          image.get_image()->Type = VIPS_INTERPRETATION_HDR;
   }
  ... flatten channels to RGB(3) something something..
fs.readFile("test.hdr", function (err, data) {
  if (err) throw err;
  // console.log(data);  
  sharp(data)
    .toFile('output.jpeg', (err, info) => {
      if (err) {
        console.log(err);
      }
      console.log(info)
    });
});
//[Error: Input buffer contains unsupported image format] :(

What alternatives have you considered?
Using libvibs directly?

Is there a sample image that helps explain?
any hdri

Activity

  1. lovell commented on Oct 31, 2021

    @lovell
    Owner

    Does this refer to the Radiance/RGBE image format? If so, you'll need to use a custom libvips compiled with support for this format as the prebuilt binaries do not include it.

    https://sharp.pixelplumbing.com/install#custom-libvips

  2. Gatts011 commented on Nov 5, 2021

    @Gatts011
    Author

    Im unfortunately using windows, so compiling a custom, globally-installed version of libvips will be difficult. I'll look into compiling with ubuntu for windows or hijack my brothers machine... unless you know a simpler way?

    Once thats done will I need to change sharp source code like
    if (descriptor->rawChannels > 3) { //channels are more than 3 - hdr has 10 ish?
    image.get_image()->Type = VIPS_INTERPRETATION_HDR;
    }
    ??? or dont I touch that?

  3. lovell commented on Nov 25, 2021

    @lovell
    Owner

    Using a custom libvips on Windows is unsupported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions