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

How to create a grid HEIF #1176

Closed
TimYao18 opened this issue May 23, 2024 · 1 comment · Fixed by #1180
Closed

How to create a grid HEIF #1176

TimYao18 opened this issue May 23, 2024 · 1 comment · Fixed by #1180

Comments

@TimYao18
Copy link

TimYao18 commented May 23, 2024

I saw the code do ImageGrid::write() but I don't know how to use it. I think this is related with Box_iref, iloc and iinf box.
Is there spec or handbook to do this? I have 23008-12 and 14496-12 spec but don't understand how this works..
Could somebody give me some hint?

And is iref_box can reference to single image encoding, not grid?

@farindk
Copy link
Contributor

farindk commented May 23, 2024

(Duplicate of #648)

Writing tiled images are not supported yet, but I think this is something we should now finally add.

The easiest way to understand how these images work is probably to look at an example. Basically all HEIC images from the iOS camera are tiled and you can have a look with heif-info -d how they are structured. However, it won't be easy to add in a PR.

Tiled images have a "master" image of type grid:

| | Box: infe -----
| | size: 21   (header size: 12)
| | item_ID: 49
| | item_protection_index: 0
| | item_type: grid
| | item_name: 
| | content_type: 
| | content_encoding: 
| | item uri type: 
| | hidden item: false

which references all tiles:

reference with type 'dimg' from ID: 49 to IDs: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

Each of these images is encoded like a normal image.

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

Successfully merging a pull request may close this issue.

2 participants