-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Issue with color_profile on iOS #397
Comments
I don't understand why it should be a problem to have a nclx in the image. |
Problem: image which has this color profile can't be read on iOS 12 using native libraries. |
I'm not saying that this must be implemented, but asking is there way to achieve it? |
Just because it's the only thing that differs in heif-info doesn't mean it's the only difference. What if you just don't write the colr box and see what happens? That's just adding |
I will try this, thank you. Will let you a bit later. |
@silverbacknet I di try this: But resulted image can't be read. To be sure: I actually using last release tag - 1.9.1. Line numbers there different from master. So I found function |
I also tried do not write type and just commented writing type and color profile itself. |
@NikolayJuly It's probably not enough to add a You'll have to remove writing the colr box in heif_context.cc::encode_image_as_hevc().
remove this block of code. It might also be enough to remove the second part, which is writing the nclx profile if there is no ICC profile. I'm a bit reluctant to add an option to switch off writing nclx, because if iOS 12 cannot read nclx profiles, it is obviously a bug in iOS 12 and we should not care too much providing workarounds for old iOS versions. |
@farindk Sorry for long silence, were busy with xmas prep. I can confirm, that commenting this color profile lines, actually fixed everything. Image can be natively read on iOS 12. Thanks for your help In separate message I will describe my experience working with libheif and what I believe should be fixed, even tho I assume not everyone will agree with me |
Thank you a lot for help and response. Since I got so much attention, here is what I found, while tryed to use libheif.
|
|
@farindk Thanks a lot for your response.
All my test was done on 1.9.1, looks like I missed that 1.10 was released in the middle. But I didn't test 1.10 now as well, I checked out recommended commit, so whole response will be about that commit.
I tested it now and yes, it worked. Might be the case with odd image before, when I did initial tests.
My initial understanding was that if I do not set all pixels, image can't be encoded. Again, might be pointed to my initial tests with odd image. So, if image can be created with not initialised memory correctly, then yes, it is fine not to set memory. My initial issue was, that to start using lib I actually was have to set all pixels and it wasn't easy, which just making learning curve harder.
I tested and... it works! I didn't set any parameters, just copied image data. And it works on iOS 12. And additionally What should I do? Just close it? |
…S cannot read them (strukturag#397)
…macOS/iOS cannot read them (strukturag#397)" This reverts commit ad6d3c7.
I think this got feedback, and can be closed. |
Hello. I would like describe an issue, which I run into using this libheif/
Pre story: For few years, I used my mac to generate content for iOS application. Content is heic images. And everything was fine till this BigSur update. Reason is simple: after I updated on BigSur images which i generate on mac, can't be opened in iOS app running on iOS 12. For now both sides used native tools: CGImage, etc
I saw 1 different in
heif-info
tool responseWith old images, generated on catalina -
color profile: no
But with BigSur generating
color profile: nclx
So I logically assumed that this is an issue. And I tried use this library on macOS instead of native one. I hoped that I will be able to avoid setting random color profile, but this lib also set by default
nclx
color profile. And no way to ask set nothing.And I prefer avoid using libheif in iOS app, since it will be simpler switch to jpg instead of heic.
Could you advice the way to not set random/default
color profile
using this library?The text was updated successfully, but these errors were encountered: