-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Avif format support #57
Comments
There's an open PR in the opencv repo that adds support for avif image files. I built the python package using this fork and changed the file format tuple inside |
Could you please explain how to do that? I want AVIF support for mokuro. |
It seems that for now, the OpenCV team will treat avif support as experimental so you'll probably need to build the lib yourself. I used this repo to compile a custom opencv python package using the mentioned PR fork. Basically what I did was:
After that, I just used mokuro directly from my cloned repository Also, It took me hours of trial and error to make it work since I have almost no experience with either Python or C++, so maybe there's a better way to do this |
I've tried to install it using your steps and it doesn't appear to work for me. I manually compiled and installed opencv from their github (the pr has been merged now). I installed the git version of opencv-python. I cloned the mokuro repository with submodules and made the modifications and then I installed it using
I wind up getting this error though:
Any ideas? |
It seems that the version you compiled still doesn't have avif support. The PR was merged but it seems that the Later I'll try to compile from the post-merge repo and fork from mokuro to see if I can make the process a bit easier. |
Yep after about 3 hours of crying to chatgpt i managed to get it all working. I might be able to simplify it for other people who happen across this thread. I attached the compiled linux python .so file with avif support. For me since I'm using conda I placed it in
where another person would have to put it would need to be modified for where their stuff is stored. I'm not sure if this also requires the opencv software itself to be installed as well or if this .so file is all that is actually needed. From there you just modify the file that Jenry mentioned earlier and install it. mokuro has submodules that it depends on, so git clone isn't enough to get it to work. You need to pull it down like this:
then you change
in
to
then you can install it by going to the mokuro rootdir and typing
Hopefully I remembered all the steps correctly and hopefully this is useful to someone else. Edit: note this probably won't work on windows since .so is a linux library format. WSL might work though. |
For Windows, i recommend just bulk converting avif to png with something like XnConvert |
Are there any plans to support avif image files in mokuro ? By looking at the code it seems that only jpg, jpeg and png are supported at the moment.
The text was updated successfully, but these errors were encountered: