Closed ledyba-z closed 4 years ago
FYI: I prepared the test images with rotation/mirroring/crop operations, so feel free to use them:
https://github.com/link-u/avif-sample-images#kimono---transformation-tests
Windows applications display 1080x1920 picture:
But we display 1920x1080:
I think it is because of irot.
Testfile: https://github.com/AOMediaCodec/av1-avif/blob/master/testFiles/Microsoft/Ronda_rotate90.avif
I can rotate the picture myself but I need some info that I should do it.
I am in the middle of refactoring the RGB conversion, but after that I can surface the content of these boxes the way that I surface container*
values right now.
What a co-incidence. New testfiles appeared: https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Link-U
I created those files 😄. Please use them to check!
I've decided that it is libavif's responsibility to plumb through these boxes (both encode and decode), but I'm going to consider the implementation of these transformations to be an entirely separate thing . I could see offering optional convenience functions for people that directly manipulate the pixel buffers, but that isn't in scope for this specific issue.
I'm going to implement these boxes now and surface/honor them in avifImage. I'm hoping to have this in today, and they'll be available in v0.6.0.
@ledyba-z Thanks for those test images; they were very useful in verifying my plumbing.
Hi!
@dreampiggy says that he or she wants to support rotation/mirroring/cropping in SDImageAVIFCoder, but I found that
imr
,irot
,clap
box (defined in HEIF) is not recognized:https://github.com/AOMediaCodec/libavif/blob/f9bba7d9934b8aefeb1d5f1a57c98ea809aebe50/src/read.c#L653-L679
MIAF specification says that there are no transformation information in EXIF metadata in MIAF, so libavif might have to parse those boxes to handle transformation correctly.
Our avif parser implementation, libavif-container parses them, so please refer if you need.
https://github.com/link-u/libavif-container/blob/371ca8f421d1622065cd1f34e8d0abe0886cf259/src/avif/Parser.cpp#L231-L321