What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

16-bit greyscale color exportation problem


Remousamavi

New Member
Messages
2
Likes
0
So, I'm trying to export a 16-bit greyscale image to use as a heightmap. For this image I'm using exact halftone as "sea level" where 7FFF / 8000 is shore, 0000 is lowest possible point, and FFFF is the heighest. But when I export it, the colors are offset so that 7FFF winds up being something like 6D02. As I understand it, gamma correction is probably responsible, but I haven't found any tips that have made Photoshop not do this.

So, which bunch of settings should I change in order to export true, not apparent, color? Preferably as a BMP, PBM, or if necessary a PNG.
 
Hi @Remousamavi
Yes very likely that there was a colorspace conversion (that includes grayscale conversions) where the tone response curve (also known as gamma) was different.
The key is either to avoid the conversion or making sure the conversion is done between spaces that have the same tone response curve.

To be more specific, it would be helpful to know
- Are you using Photoshop CC or some other program in which you are editing
- Are you editing in Grayscale mode or in RGB mode where R=G=B for each pixel
- In which color space are you editing e.g. If RGB Adobe RGB, sRGB etc or if in Grayscale what Gamma or Dot Gain space are you using
- What specific command are you using in Photoshop e.g Save As, Export, Save for Web and maybe a screen shot of the settings and/or preferences if using the Export command
- Are you in Photoshops 16 bit mode (that would be my assumption yet double checking)
- Are you saving/exporting also to RGB mode or converting to Grayscale mode and which RGB/Gray space are you converting too.
- After saving the file, which application will be using the file. The receiving application may required a given color/gray space and may be doing a conversion on input.

Without the details of above, if you are staying in RGB or Grayscale, the easiest way to avoid a conversion is to uncheck the box that says convert to sRGB

As additional information or tidbits
Photoshop in 16 bit mode actually only supports 15 bits (it rounds the lower bit) - not sure if that is important to you or not
Save for web I believe converts to 8 bit mode (at least it used to)
Not all export formats support 16 bits. PNG and PBM does yet I am pretty sure BMP does not. Is preserving 16 bit data important to you?
I noticed you are using hex format in 16 bit mode. I have not seen 16bit grayscale representation in hex in the info panel or in the color checker. I may be missing something on how to do that in Photoshop if you would like to share how you do that.
 
- I am using Photoshop CC 2019 on Windows 10.
- I have Image > Mode set to Grayscale, 16 Bits/Channel.
- I don't know what that means or where to look for it.
- I've tried all three, but I'm primarily using Save As.
- I have Image > Mode set to 16 Bits/Channel.
- I'm saving to greyscale, as far as I know.
- I'm using GIMP to test-load the files. The problem first became apparent in Unity when I attempted to use it as a heightmap.
 
Thanks for that info @Remousamavi and that is helpful.

I have not used GIMP for a long time yet downloaded the most recent version to help track down your issue.
There are three places that this could be involved
a) settings in GIMP
b) exact export settings from GIMP
c) settings in PS
d) how exported/ saved in PS

To nail this down the quickest here are the specific items that would really help
1) Screen shot of the header in GIMP of the file name. I gave a sample screenshot from GIMP that I just created:
Screen Shot 2021-05-27 at 10.44.02 AM.png

2) Share the exact file in question exported from GIMP on a file sharing site. That can be used to verify what grayspace is being used the GIMP image and how to proceed with PS

3) A screenshot of you Edit > Color Settings in Photoshop per the example from my system below:
Screen Shot 2021-05-27 at 10.44.40 AM.png

With the above information I think we can nail down how to achieve you desired results. I am pretty sure if the all the gammas are matched in settings and export processes you will not have any changes in color numbers.
John Wheeler
 
BTW - @Remousamavi
From a math standpoint, the value the came up as 6D02 very closely matches if an incoming image was in a sRGB tone response curve and convert to a 20% dot gain grayspace.
As a shortcut tip to try, in the Photoshop Color settings for the Gray Working space, change it to sGray. sGray's tone response curve matches that of sRGB so if my guess is right, your numbers would stay the same and have no conversion. Might be worth a try. If that does not work, providing the information from the prior post would be the next step.
John Wheeler
 

Back
Top