Jump to content

Editing 16bit grayscale images from opentopography.org


Recommended Posts

When you get a 16bit heightmap that's basically all white (but confirmed working in 3D software) and want to do some editing on it, how does one go about doing that in Affinity Photo?

I tried adding a levels modifier and dragging each slider to the extreme to see what happened, but nothing. The image was still all white.

Link to comment
Share on other sites

Do you have one you can share with us, @eobet?

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Link to comment
Share on other sites

I found out that the 3D software actually mangled the data on export. I found other means of preserving it and now I can use a levels modifier to see the contents!

However, still a bit unsure about editing it, because it seems my brushes when sampling are still hexadecimal, which I don't think is right for a 16bit channel image...

https://we.tl/t-u1K8bU4vMV

I saw a pop-up about a greyscale color conversion when I opened the file. Should that be disabled somehow?

Link to comment
Share on other sites

10 minutes ago, eobet said:

I saw a pop-up about a greyscale color conversion when I opened the file. Should that be disabled somehow?

Thanks for the file. It looks like the data is in the Composite Intensity channel, but I have no good ideas on dealing with it. Probably someone else will have something.

The popup I get when opening it is about assigning a grayscale profile "to the unprofiled document". I don't think there's anything you can do about that. All images you work on in Affinity Photo must have a profile, and if the image you're opening doesn't have one, it will be assigned.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Link to comment
Share on other sites

16 hours ago, eobet said:

I tried adding a levels modifier and dragging each slider to the extreme to see what happened, but nothing. The image was still all white.

A levels adjustment works to me as expected (regardless of Composite / Intensity channels, which I don't know either).

leveladjust.thumb.jpg.ed20ed6ce66a9b61148e2320c0aa1bf6.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

According to Photoshop & Imagemagick it's a 32bit grayscale image
Interestingly, Photoshop produces the inverse compared with Photo, so which is correct?

PhotoVphotoshop.png

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

32 minutes ago, David in Яuislip said:

which is correct?

Exiftool reports 32 bit, too, … and APhoto shows some more details (without levels adjustment) after converting to 32 bit.

aph32bit.thumb.jpg.32fc00e409963db259b2532b6462885d.jpg

… whereas XnViewMP seems to open it like quite a different image (after automatically converting it to 8-bit RGB during opening).

xnview1.thumb.jpg.02e3aae707e696d966022a893c2f2dbf.jpg

xnview2.jpg.3dd5cbd0cc20a7062ede653d0dab856f.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

Ok, but the question now is how do I paint in it while preserving the color depth as it is?

When I do a color dropper on a part of the image, I get a hexadecimal color code back and I don't think that's right...

Link to comment
Share on other sites

You cannot edit this image in grey/32 in Photo. It gets automatically converted into grey/16, probably cutting off lightness exceeding 1.0.

 

Try finding another app allowing editing grey/32, or converting to RGB/32 which can be handled by Affinity.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

It seems importing/editing this actual image has been discussed on stackoverflow

https://stackoverflow.com/questions/43962213/reading-32-bit-grayscale-tiff-using-libtiff-net

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

See 

and

Handling of 32bit tiff files, both GREY and RGB, seems broken. Don’t think V2 improved in that area.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.