Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colourspace scRGB questions (nip2) #65

Open
DavidRosen opened this issue Aug 14, 2017 · 4 comments
Open

colourspace scRGB questions (nip2) #65

DavidRosen opened this issue Aug 14, 2017 · 4 comments
Labels

Comments

@DavidRosen
Copy link

DavidRosen commented Aug 14, 2017

Is there somewhere else I should be posting questions like these?

  1. How can I transform an image to a linear-rgb colourspace such as scRGB (say, from sRGB), as I don't see this as a choice in the Colourspaces menu?

  2. Is there another linear-rgb colourspace that I could transform to, where numeric values of zero represent zero light? My understanding is that scRGB has an offset.

  3. Why does an scRGB image get darker when transformed to another colourspace? I started with a version of memorial.hdr that I had already normalised it to [0,1] (so there would be no need for further normalisation in a colourspace transformation), but then when transforming it to either sRGB or Lab it gets much darker still.

I'm using nip2 8.4.0 under Windows 7.

@DavidRosen DavidRosen changed the title colourspace questions colourspace questions (nip2) Aug 14, 2017
@DavidRosen DavidRosen changed the title colourspace questions (nip2) colourspace scRGB questions (nip2) Aug 14, 2017
@jcupitt
Copy link
Member

jcupitt commented Aug 14, 2017

Hello David, no, this is the best place for questions.

  1. libvips has had scRGB for a few years, but I've never got around to adding it to the nip2 menus, I must do this.

  2. XYZ is the simplest linear space that nip2 supports.

  3. It looks like HDR is a bit broken in nip2. If you run vips copy uffizi_probe.hdr x.jpg at the command-line, it looks fine, but Radiance / Unpack, then convert to sRGB is missing something. I think this is the poor scRGB support.

Give me a 'mo, I'll add scRGB to 8.6.

The current stable version is 8.5, by the way, it has a few fixes over the 8.4 you are using:

https://github.com/jcupitt/nip2/releases

@jcupitt jcupitt added the bug label Aug 14, 2017
@DavidRosen
Copy link
Author

Thanks!
Is there another hdri-capable image format that nip2 can import (or export) for exchange with other software?
(I tried reading pfm but the result looked almost black, regardless of whether the data was linear or sRGB.)

jcupitt added a commit that referenced this issue Aug 16, 2017
improve RAD handling
bump version
see #65
@jcupitt
Copy link
Member

jcupitt commented Aug 16, 2017

I've added scRGB supprt, and improved HDR handling. It seems to work. I'll make you a test build.

nip2 supports float tiff, that should work, though I don't know if many other packages can read it.

PFM ought to work too, perhaps it's confused by the 0 - 1 range of scRGB? You could try multiplying by 256 before saving.

@DavidRosen
Copy link
Author

Thank you.

Perhaps the scale factor in the PFM header is not being interpreted or applied correctly?

I multiplied a PFM image by 255 in ImageMagick and then read the result into nip2.
It looked about right except that it was upside-down (mirror-flipped top-to-bottom).

Yes, I'd be interested to try a Windows test-build if you could provide one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants