Comments (4)
Hi @Kinkazma,
I had a look but I'm not sure what needs fixing. I tried:
$ vips copy HDR_Map.avif x.heic
$ vipsheader HDR_Map.avif x.heic
HDR_Map.avif: 8000x1600 ushort, 3 bands, rgb16, heifload
x.heic: 8000x1600 ushort, 3 bands, rgb16, heifload
So range is preserved.
I tried adding a profile to your test image:
$ vips copy HDR_Map.avif x.avif[profile=BT20202.icc]
And copying that to HEIC preserved the profile.
I looked through libheif and there's not a lot of information on how to read and write HDR images, so I'm unclear if anything needs fixing there.
Can you give any more details?
from libvips.
On my Mac, I used an HDR profile that belongs to the computer. It didn't work any better. I'm not sure what's not working. I don't have coding skills, I do photography so it's not easy either. However, I already have HEIC files that contain HDR information if you're interested. But they come from my iPhone.
HDR_P3_D65_ST2084.icc.zip
from libvips.
This discussion has a bit more info:
Your original HDR_Map.avif
is a 16 bit image and it's correctly read as 16 bits everywhere. It does not have an ICC profile, but perhaps if you attach the correct profile it'll appear as HDR? I'm unclear.
You can also have an HDR image which is a plain SDR, plus an extra gain map image. Yours does not have a gain map, it seems to be a regular 16 bit file.
$ heif-convert HDR_Map.avif x.png
File contains 1 image
Written to x.png
We'll probably need the help of an expert to make any more progress :(
from libvips.
You can also write high bit depth HEIC like this:
$ vips copy k2.jpg b.heic[Q=65,bitdepth=10]
$ vipsheader -a b.heic
b.heic: 1450x2048 ushort, 3 bands, rgb16, heifload
width: 1450
height: 2048
bands: 3
format: ushort
coding: none
interpretation: rgb16
xoffset: 0
yoffset: 0
xres: 1
yres: 1
filename: b.heic
vips-loader: heifload
exif-data: 186 bytes of binary data
...
heif-primary: 0
n-pages: 1
heif-compression: hevc
bits-per-sample: 10
So libvips is showing as 16 bits, but the bits-per-sample
metadata field shows the file is really 10 bits internally. Presumably, with the right profile, you could write HDR like this.
from libvips.
Related Issues (20)
- vips 8.15.2 failed to build with latest xcode HOT 11
- Feature request: Support SDR→HDR via RTX HDR (upmapping / inverse tone mapping)
- AVIF with bitdepth 10 or 12 crashes
- Add nclx->icc colour management to heifload HOT 24
- Segmentation fault when performing very large number of operations HOT 1
- Subsample mode not working with jpegli HOT 4
- Add target write to `rawsave` HOT 2
- Cannot link to proper libraries on Windows 11 Pro. HOT 1
- Thumbnail/Resize removes color on Alpine HOT 1
- Add support for fractional tiff values (eg. 10 or 12 bits per pixel) HOT 6
- Include JXL as Foreign TIFF Compression HOT 3
- The position of "#include <vips/vips8>" matters. HOT 2
- distance transform HOT 1
- CMYK -> SRGB conversion results in color change
- vips dzsave crashes when saving tiff to avif HOT 3
- OSError: [Errno 30] Read-only file system: '/my' HOT 1
- Error using vips-cpp statically with msvc
- 8.15.2 crashes Erlang VM on NetBSD HOT 11
- webp works in Firefox/breaks in Chrome & libvip
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libvips.