issue_owner_repo
listlengths 2
2
| issue_body
stringlengths 0
261k
⌀ | issue_title
stringlengths 1
925
| issue_comments_url
stringlengths 56
81
| issue_comments_count
int64 0
2.5k
| issue_created_at
stringlengths 20
20
| issue_updated_at
stringlengths 20
20
| issue_html_url
stringlengths 37
62
| issue_github_id
int64 387k
2.46B
| issue_number
int64 1
127k
|
---|---|---|---|---|---|---|---|---|---|
[
"strukturag",
"libheif"
]
| Building 1.17.0 on OS X 10.13 with libjpeg-9e supplied by fink:
```
cd /sw/build.build/libheif1-shlibs-1.17.0-1/libheif-1.17.0/finkbuild/examples && /sw/var/lib/fink/path-prefix-clang/c++ -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/sw/build.build/libheif1-shlibs-1.17.0-1/libheif-1.17.0/finkbuild -I/sw/build.build/libheif1-shlibs-1.17.0-1/libheif-1.17.0 -I/sw/build.build/libheif1-shlibs-1.17.0-1/libheif-1.17.0/include/libheif -I/sw/build.build/libheif1-shlibs-1.17.0-1/libheif-1.17.0/include -isystem /sw/include -MD -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -std=c++11 -MD -MT examples/CMakeFiles/heif-enc.dir/decoder_jpeg.cc.o -MF CMakeFiles/heif-enc.dir/decoder_jpeg.cc.o.d -o CMakeFiles/heif-enc.dir/decoder_jpeg.cc.o -c /sw/build.build/libheif1-shlibs-1.17.0-1/libheif-1.17.0/examples/decoder_jpeg.cc
/sw/build.build/libheif1-shlibs-1.17.0-1/libheif-1.17.0/examples/decoder_jpeg.cc:360:26: error:
assigning to 'boolean' from incompatible type 'bool'
cinfo.raw_data_out = read_raw;
^~~~~~~~
1 error generated.
```
My jpeglib.h universally uses 'boolean' instead of 'bool', including in jpeg_decompress_struct.raw_data_out
Edit: corrected the libjpeg version. | FTBFS: incompatible type assignment in decoder_jpeg.cc | https://api.github.com/repos/strukturag/libheif/issues/988/comments | 4 | 2023-10-16T00:55:08Z | 2023-10-16T22:08:55Z | https://github.com/strukturag/libheif/issues/988 | 1,944,146,137 | 988 |
[
"strukturag",
"libheif"
]
| cmake -L
```console
`-- Cache values
BUILD_SHARED_LIBS:BOOL=ON
BUILD_TESTING:BOOL=ON
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
ENABLE_MULTITHREADING_SUPPORT:BOOL=ON
ENABLE_PARALLEL_TILE_DECODING:BOOL=ON
ENABLE_PLUGIN_LOADING:BOOL=ON
FUZZING_COMPILE_OPTIONS:STRING=-fsanitize=fuzzer,address,shift,integer -fno-sanitize-recover=shift,integer
FUZZING_CXX_COMPILER:STRING=clang++
FUZZING_C_COMPILER:STRING=clang
FUZZING_LINKER_OPTIONS:STRING=
PLUGIN_DIRECTORY:STRING=/usr/lib64/libheif
WITH_AOM_DECODER:BOOL=ON
WITH_AOM_DECODER_PLUGIN:BOOL=OFF
WITH_AOM_ENCODER:BOOL=ON
WITH_AOM_ENCODER_PLUGIN:BOOL=OFF
WITH_DAV1D:BOOL=OFF
WITH_DAV1D_PLUGIN:BOOL=ON
WITH_DEFLATE_HEADER_COMPRESSION:BOOL=OFF
WITH_EXAMPLES:BOOL=ON
WITH_FFMPEG_DECODER:BOOL=OFF
WITH_FFMPEG_DECODER_PLUGIN:BOOL=OFF
WITH_FUZZERS:BOOL=OFF
WITH_GDK_PIXBUF:BOOL=ON
WITH_JPEG_DECODER:BOOL=OFF
WITH_JPEG_DECODER_PLUGIN:BOOL=OFF
WITH_JPEG_ENCODER:BOOL=OFF
WITH_JPEG_ENCODER_PLUGIN:BOOL=OFF
WITH_KVAZAAR:BOOL=OFF
WITH_KVAZAAR_PLUGIN:BOOL=OFF
WITH_LIBDE265:BOOL=ON
WITH_LIBDE265_PLUGIN:BOOL=OFF
WITH_LIBSHARPYUV:BOOL=ON
WITH_OpenJPEG_DECODER:BOOL=OFF
WITH_OpenJPEG_DECODER_PLUGIN:BOOL=ON
WITH_OpenJPEG_ENCODER:BOOL=OFF
WITH_OpenJPEG_ENCODER_PLUGIN:BOOL=ON
WITH_RAV1E:BOOL=OFF
WITH_RAV1E_PLUGIN:BOOL=ON
WITH_REDUCED_VISIBILITY:BOOL=ON
WITH_SvtEnc:BOOL=OFF
WITH_SvtEnc_PLUGIN:BOOL=ON
WITH_UNCOMPRESSED_CODEC:BOOL=ON
WITH_X265:BOOL=ON
WITH_X265_PLUGIN:BOOL=OFF
```
and test suite is failing
```console
+ cd libheif-1.17.0
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/x86_64-redhat-linux-gnu
Start 1: encode
Start 2: region
Start 3: uncompressed_decode
Start 4: uncompressed_encode
1/4 Test #1: encode ...........................***Failed 0.01 sec
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encode is a Catch v2.13.9 host application.
Run with -? for options
-------------------------------------------------------------------------------
ispe odd size
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/encode.cc:165
...............................................................................
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/encode.cc:154: FAILED:
REQUIRE( ispe_width == expected_ispe_width )
with expansion:
0 == 122
===============================================================================
test cases: 1 | 1 failed
assertions: 5 | 4 passed | 1 failed
2/4 Test #3: uncompressed_decode .............. Passed 0.02 sec
3/4 Test #2: region ........................... Passed 0.32 sec
4/4 Test #4: uncompressed_encode .............. Passed 0.58 sec
75% tests passed, 1 tests failed out of 4
Total Test time (real) = 0.59 sec
The following tests FAILED:
1 - encode (Failed)
Errors while running CTest
```
| 1.17.0: test suite is failing in `encode` unit | https://api.github.com/repos/strukturag/libheif/issues/986/comments | 16 | 2023-10-15T20:17:40Z | 2023-12-08T15:15:39Z | https://github.com/strukturag/libheif/issues/986 | 1,944,042,675 | 986 |
[
"strukturag",
"libheif"
]
| I would like to rename `heif-convert` to `heif-dec` to have a simpler and more consistent naming. Of course, we have to keep a symlink from `heif-convert` for backwards compatibility.
Are there any concerns about this? Things to take care of?
| rename heif-convert to heif-dec (planned for v1.18.0) | https://api.github.com/repos/strukturag/libheif/issues/985/comments | 1 | 2023-10-14T16:57:44Z | 2023-10-17T23:53:08Z | https://github.com/strukturag/libheif/issues/985 | 1,943,390,275 | 985 |
[
"strukturag",
"libheif"
]
| Hi, I tried to use the [heif-test.go](examples/heif-test.go) program of tagged version 1.16.2, but it failed with the following message:
```
libheif version: 1.16.2
Performing lowlevel conversion of example.heic
Number of top level images: 2
List of top level image IDs: []int{20004, 20006}
Primary image: 20004
Image size: 1280 × 854
Could not decode image: Unsupported feature: Unsupported codec
Performing highlevel conversion of example.heic
Could not decode image: Unsupported feature: Unsupported codec
failed to decode image: Unsupported feature: Unsupported codec
Done.
```
I am using [libheif-dev from Ubuntu](https://packages.ubuntu.com/mantic/libheif-dev) which is at version 1.16.2-2ubuntu1.
What could be the issue?
| heif-test.go can not decode example image | https://api.github.com/repos/strukturag/libheif/issues/984/comments | 0 | 2023-10-14T00:16:12Z | 2023-10-14T00:16:12Z | https://github.com/strukturag/libheif/issues/984 | 1,942,809,028 | 984 |
[
"strukturag",
"libheif"
]
| https://github.com/strukturag/libheif/commit/55dfd3da6e4ca6a5cd31cf39421656a2301f0998 appears to have broken the regions test.
```
bradh@micrantha:~/libheif/build$ ./tests/region
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
region is a Catch v2.13.9 host application.
Run with -? for options
-------------------------------------------------------------------------------
create regions
-------------------------------------------------------------------------------
/home/bradh/libheif/tests/region.cc:46
...............................................................................
/home/bradh/libheif/tests/test_utils.cc:44: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
2 == 0
with message:
regions.heif
-------------------------------------------------------------------------------
create mask region
-------------------------------------------------------------------------------
/home/bradh/libheif/tests/region.cc:228
...............................................................................
/home/bradh/libheif/tests/test_utils.cc:44: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
2 == 0
with message:
regions_mask.heif
-------------------------------------------------------------------------------
create inline mask region from data
-------------------------------------------------------------------------------
/home/bradh/libheif/tests/region.cc:353
...............................................................................
/home/bradh/libheif/tests/test_utils.cc:44: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
2 == 0
with message:
regions_mask_inline_data.heif
-------------------------------------------------------------------------------
create inline mask region from image
-------------------------------------------------------------------------------
/home/bradh/libheif/tests/region.cc:448
...............................................................................
/home/bradh/libheif/tests/test_utils.cc:44: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
2 == 0
with message:
regions_mask_inline_image.heif
===============================================================================
test cases: 5 | 1 passed | 4 failed
assertions: 51 | 47 passed | 4 failed
```
Not sure why that would have been a problem - under investigation. | Broken regions test | https://api.github.com/repos/strukturag/libheif/issues/983/comments | 2 | 2023-10-13T00:49:47Z | 2023-10-13T08:08:05Z | https://github.com/strukturag/libheif/issues/983 | 1,941,036,810 | 983 |
[
"strukturag",
"libheif"
]
| There are many warnings when building master:
```
warning: Tag 'OUTPUT_TEXT_DIRECTION' at line 102 of file 'C:/msys64/home/kmilos/libheif/build/Doxy
file' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'CLANG_ASSISTED_PARSING' at line 1161 of file 'C:/msys64/home/kmilos/libheif/build/Do
xyfile' belongs to an option that was not enabled at compile time.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag 'CLANG_ADD_INC_PATHS' at line 1167 of file 'C:/msys64/home/kmilos/libheif/build/Doxyf
ile' belongs to an option that was not enabled at compile time.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag 'CLANG_OPTIONS' at line 1175 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile' b
elongs to an option that was not enabled at compile time.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag 'CLANG_DATABASE_PATH' at line 1188 of file 'C:/msys64/home/kmilos/libheif/build/Doxyf
ile' belongs to an option that was not enabled at compile time.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag 'HTML_TIMESTAMP' at line 1335 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile'
has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'FORMULA_TRANSPARENT' at line 1640 of file 'C:/msys64/home/kmilos/libheif/build/Doxyf
ile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'LATEX_SOURCE_CODE' at line 1953 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfil
e' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'LATEX_TIMESTAMP' at line 1969 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile'
has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'RTF_SOURCE_CODE' at line 2043 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile'
has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'DOCBOOK_PROGRAMLISTING' at line 2148 of file 'C:/msys64/home/kmilos/libheif/build/Do
xyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'CLASS_DIAGRAMS' at line 2335 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile'
has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'DOT_FONTNAME' at line 2377 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile' ha
s become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'DOT_FONTSIZE' at line 2384 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile' ha
s become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
warning: Tag 'DOT_TRANSPARENT' at line 2632 of file 'C:/msys64/home/kmilos/libheif/build/Doxyfile'
has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it us
ing "doxygen -u"
``` | Doxygen warnings | https://api.github.com/repos/strukturag/libheif/issues/979/comments | 6 | 2023-10-10T10:03:55Z | 2024-06-27T12:58:24Z | https://github.com/strukturag/libheif/issues/979 | 1,934,955,794 | 979 |
[
"strukturag",
"libheif"
]
| #925 broke the Emscripten CI, so adding an issue to bring back testing of Emscripten.
_Originally posted by @fancycode in https://github.com/strukturag/libheif/issues/925#issuecomment-1752742429_
| Fix Emscripten CI tests | https://api.github.com/repos/strukturag/libheif/issues/977/comments | 5 | 2023-10-09T10:25:04Z | 2023-10-18T18:07:50Z | https://github.com/strukturag/libheif/issues/977 | 1,932,754,360 | 977 |
[
"strukturag",
"libheif"
]
| Moving @kmilos comment from #973 into a issue of its own.
> maybe it's time to bump CMake minimum required version and simplifyby using imported targets ZLIB::ZLIB and PNG::PNG...
Do you know what minimum cmake version is required for that? I think the current upper limit might be cmake v3.16.3 (Ubuntu 20.04).
> 3.1 for ZLIB, 3.5 for PNG
| Use CMake imported targets | https://api.github.com/repos/strukturag/libheif/issues/975/comments | 3 | 2023-10-09T08:48:27Z | 2023-10-09T10:19:58Z | https://github.com/strukturag/libheif/issues/975 | 1,932,582,822 | 975 |
[
"strukturag",
"libheif"
]
| Hey.
I think #933 was not fully fixed by #914.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041242:
Since 1.16.2 displaying images works again with `eog`, but still fails with e.g. geeqie.<br>
There's a branch based upon 1.16.2, with the patch from #914 cherry-picked, but building the package with that still causes geeqie to fail:
```
$ geeqie
warning: heif reader error: Unsupported feature: Unsupported codec
warning: heif reader error: Color profile does not exist: Unspecified
warning: heif reader error: Unsupported feature: Unsupported codec
```
Any ideas?
Thanks,
Chris. | displaying images still fails since version > 1.15.1 | https://api.github.com/repos/strukturag/libheif/issues/974/comments | 41 | 2023-10-08T07:52:13Z | 2023-10-14T09:17:32Z | https://github.com/strukturag/libheif/issues/974 | 1,931,693,809 | 974 |
[
"strukturag",
"libheif"
]
| Looks like there is no anywhere in cmake files zlib detection despite fact that libheif examples are using zlib
<details>
```console
[ 56%] Building CXX object examples/CMakeFiles/heif-convert.dir/encoder_png.cc.o
cd /home/tkloczko/rpmbuild/BUILD/libheif-1.16.2/x86_64-redhat-linux-gnu/examples && /usr/bin/g++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -DWITH_UNCOMPRESSED_CODEC=1 -I/home/tkloczko/rpmbuild/BUILD/libheif-1.16.2/x86_64-redhat-linux-gnu -I/home/tkloczko/rpmbuild/BUILD/libheif-1.16.2 -I/home/tkloczko/rpmbuild/BUILD/libheif-1.16.2/include/libheif -I/home/tkloczko/rpmbuild/BUILD/libheif-1.16.2/include -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -MD -MT examples/CMakeFiles/heif-convert.dir/encoder_png.cc.o -MF CMakeFiles/heif-convert.dir/encoder_png.cc.o.d -o CMakeFiles/heif-convert.dir/encoder_png.cc.o -c /home/tkloczko/rpmbuild/BUILD/libheif-1.16.2/examples/encoder_png.cc
/home/tkloczko/rpmbuild/BUILD/libheif-1.16.2/examples/encoder_png.cc:31:10: fatal error: zlib.h: No such file or directory
31 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
```
</details>
| 1.16.2: build fails because missing zlib.h | https://api.github.com/repos/strukturag/libheif/issues/972/comments | 6 | 2023-10-06T19:23:56Z | 2023-10-09T13:46:11Z | https://github.com/strukturag/libheif/issues/972 | 1,930,821,670 | 972 |
[
"strukturag",
"libheif"
]
| **Information**
svt-av1 1.7.0-1.1 (via [ALHP](https://somegit.dev/ALHP/ALHP.GO))
libheif 1.16.2-1.1 (via [ALHP](https://somegit.dev/ALHP/ALHP.GO))
```
heif-enc --list-encoders
HEIC encoders:
- x265 = x265 HEVC encoder (3.5) [default]
AVIF encoders:
- aom = AOMedia Project AV1 Encoder Psy v3.6.0 [default]
- svt = SVT-AV1 encoder v1.7.0-dirty
- rav1e = Rav1e encoder
```
**Reproduction**
```
heif-enc -A -e svt image.png
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v1.7.0-dirty
Svt[info]: SVT [build] : GCC 13.2.1 20230801 64 bit
Svt[info]: LIB Build date: Aug 27 2023 18:37:59
Svt[info]: -------------------------------------------
Svt[error]: Instance 1: Encoder Bit Depth shall be only 8 or 10
Svt[warn]: If you are using tiles with the intent of increasing the decoder speed,
please also consider using --fast-decode 1, especially if the intended decoder is
running with limited multi-threading capabilities.
SvtMalloc[info]: you have no memory leak
Could not encode HEIF/AVIF file: Encoder plugin
generated an error: Unspecified: SVT-AV1 error
```
```
heif-enc -A -e svt -p input-depth=8 image.png
Error: Unsupported encoder parameter
```
[**Sample.png.zip**](https://pixeldrain.com/u/6PJ3WZ1p) Download
| SVT-AV1: Could not encode | https://api.github.com/repos/strukturag/libheif/issues/971/comments | 4 | 2023-10-06T10:12:39Z | 2024-04-13T22:32:47Z | https://github.com/strukturag/libheif/issues/971 | 1,929,845,155 | 971 |
[
"strukturag",
"libheif"
]
| Hello,
I tried feeding HEIF with 1-bit graphics.
I viewed the image with XnView and decoded it with heif-convert.
What I got is a corrupted image.


| testing fails with 1bit/2color PNG sample to heif | https://api.github.com/repos/strukturag/libheif/issues/969/comments | 9 | 2023-09-30T09:03:21Z | 2023-10-17T20:23:12Z | https://github.com/strukturag/libheif/issues/969 | 1,920,183,078 | 969 |
[
"strukturag",
"libheif"
]
| Hello,
since I have no idea about compiling
and got lost in a rabbit hole trying to sift through a gigabyte-sized toolset,
I asked a colleague if he could do it for me.
We then realized that the actual encoder (heif-enc.exe) is missing.
My question is: are we overlooking something, or what's going on?
I used this version before:
https://github.com/pphh77/libheif-Windowsbinary
but this project has been dead since the summer of 2022.
And it's stuck at version v1.14.0.
It still has the PNG bug that flipped the images upside down.
So, where can you get fresh binaries for Windows these days?
Thanks in advance for your help. | no heif-enc was found. | https://api.github.com/repos/strukturag/libheif/issues/967/comments | 5 | 2023-09-25T03:49:20Z | 2023-10-07T10:29:41Z | https://github.com/strukturag/libheif/issues/967 | 1,910,602,624 | 967 |
[
"strukturag",
"libheif"
]
| can you update your codebase to v1.16.2 ?(https://github.com/strukturag/libheif/releases/)
there is a bug in v1.14: all my pictures are flipped.
this was fixed in v1.14.1 .
sadly, there is no new update or artifact. :(
thx 4 your help | [bug] filipped pictures. please update the code base. | https://api.github.com/repos/strukturag/libheif/issues/966/comments | 9 | 2023-09-23T00:34:33Z | 2023-09-23T02:38:20Z | https://github.com/strukturag/libheif/issues/966 | 1,909,644,044 | 966 |
[
"strukturag",
"libheif"
]
| If libheif is configured with
```
-DWITH_LIBDE265_PLUGIN=ON \
-DWITH_X265_PLUGIN=ON \
```
the encode test fails:
```
/usr/bin/ctest --test-dir redhat-linux-build --output-on-failure --force-new-ctest-process -j4
Internal ctest changing into directory: /builddir/build/BUILD/libheif-1.16.2/redhat-linux-build
Test project /builddir/build/BUILD/libheif-1.16.2/redhat-linux-build
Start 1: conversion
Start 2: encode
Start 3: uncompressed_decode
1/3 Test #2: encode ...........................***Failed 0.01 sec
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encode is a Catch v2.13.9 host application.
Run with -? for options
-------------------------------------------------------------------------------
ispe odd size
-------------------------------------------------------------------------------
/builddir/build/BUILD/libheif-1.16.2/tests/encode.cc:149
...............................................................................
/builddir/build/BUILD/libheif-1.16.2/tests/encode.cc:124: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
3 == 0
===============================================================================
test cases: 1 | 1 failed
assertions: 1 | 1 failed
2/3 Test #3: uncompressed_decode .............. Passed 0.01 sec
3/3 Test #1: conversion ....................... Passed 0.13 sec
67% tests passed, 1 tests failed out of 3
Total Test time (real) = 0.14 sec
The following tests FAILED:
2 - encode (Failed)
Errors while running CTest
```
Could the tests be fixed to work even if the encoders and decoders are built as plugins? | encode test fails if HEVC encoder and decoder are built as plugins | https://api.github.com/repos/strukturag/libheif/issues/965/comments | 1 | 2023-09-20T10:12:06Z | 2023-10-18T00:06:36Z | https://github.com/strukturag/libheif/issues/965 | 1,904,656,074 | 965 |
[
"strukturag",
"libheif"
]
| Hi,
Is there any documented way to get binaries/dll for android and ios. I am using libheif-sharp and that requires platform specific binaries for it to work. | Binaries for android and ios | https://api.github.com/repos/strukturag/libheif/issues/963/comments | 1 | 2023-09-18T06:09:31Z | 2023-09-18T09:50:20Z | https://github.com/strukturag/libheif/issues/963 | 1,900,235,521 | 963 |
[
"strukturag",
"libheif"
]
| @farindk Hi, There maybe a memory leak
x265-3.4
libheif-1.16.2
libvips-8.14.4
Ubuntu 22.04
**Steps:**
1. gcc -g -O2 -o thumbnail_heic thumbnail_heic.c \`pkg-config vips --cflags --libs\`
2. valgrind --tool=memcheck --log-file=mem_leak.log --leak-check=full --show-leak-kinds=all -s ./thumbnail_heic ./IMG_0512.HEIC
**Test case:**
[IMG_0512.HEIC.zip](https://github.com/strukturag/libheif/files/12583033/IMG_0512.HEIC.zip)
thumbnail_heic.c
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vips/vips.h>
#include <vips/foreign.h>
int main(int argc, char **argv)
{
if (argc < 2)
{
printf("Usage: %s <heic file path>\n", argv[0]);
return 1;
}
const char *heic_file_path = argv[1];
const int width = 100;
const int height = 75;
// init vips
if (VIPS_INIT(argv[0]))
{
vips_error_exit("unable to start VIPS");
}
// read to buffer
char *buffer = NULL;
size_t file_size = 0;
if (!g_file_get_contents(heic_file_path, &buffer, &file_size, NULL))
{
vips_error_exit("g_file_get_contents err");
}
VipsImage *thumbnail = NULL;
if (vips_thumbnail_buffer(buffer, file_size, &thumbnail, width, "height", height, NULL))
{
vips_error_exit("vips_thumbnail_buffer err");
}
void* buffer_thumbnail = NULL;
size_t buffer_thumbnail_size = 0;
int ret = vips_image_write_to_buffer(thumbnail, ".heic", &buffer_thumbnail, &buffer_thumbnail_size, NULL);
if (0 != ret)
{
printf("vips_image_write_to_buffer err %d\n", ret );
}
// free
g_object_unref(thumbnail);
if (NULL != buffer)
{
free(buffer);
}
if (NULL != buffer_thumbnail)
{
free(buffer_thumbnail);
}
return 0;
}
```
**Result: mem_leak.log**
```c
==32124== 1,112 bytes in 1 blocks are definitely lost in loss record 7,659 of 7,843
==32124== at 0x4C2B375: memalign (vg_replace_malloc.c:908)
==32124== by 0x4C2B43F: posix_memalign (vg_replace_malloc.c:1072)
==32124== by 0x139413F5: x265::x265_malloc(unsigned long) (in /usr/local/lib/libx265.so.192)
==32124== by 0x1384AEBE: x265_encoder_open_192 (in /usr/local/lib/libx265.so.192)
==32124== by 0x135399E7: x265_encode_image(void*, heif_image const*, heif_image_input_class) (in /usr/local/lib64/libheif.so.1.16.2)
==32124== by 0x134C4CA1: HeifContext::encode_image_as_hevc(std::shared_ptr<HeifPixelImage> const&, heif_encoder*, heif_encoding_options const&, heif_image_input_class, std::shared_ptr<HeifContext::Image>&) (in /usr/local/lib64/libheif.so.1.16.2)
==32124== by 0x134C3BE3: HeifContext::encode_image(std::shared_ptr<HeifPixelImage> const&, heif_encoder*, heif_encoding_options const&, heif_image_input_class, std::shared_ptr<HeifContext::Image>&) (in /usr/local/lib64/libheif.so.1.16.2)
==32124== by 0x134A1AEE: heif_context_encode_image (in /usr/local/lib64/libheif.so.1.16.2)
==32124== by 0x1323B3E8: vips_foreign_save_heif_write_block (in /usr/local/lib64/vips-modules-8.14/vips-heif.so)
==32124== by 0x5082791: wbuffer_write_thread (in /usr/local/lib64/libvips.so.42.16.4)
==32124== by 0x506C229: vips_threadset_work (in /usr/local/lib64/libvips.so.42.16.4)
==32124== by 0x506BD4E: vips_thread_run (in /usr/local/lib64/libvips.so.42.16.4)
==32124== LEAK SUMMARY:
==32124== definitely lost: 1,112 bytes in 1 blocks
==32124== indirectly lost: 0 bytes in 0 blocks
==32124== possibly lost: 3,148,902 bytes in 53 blocks
==32124== still reachable: 37,989,012 bytes in 19,787 blocks
==32124== of which reachable via heuristic:
==32124== length64 : 40 bytes in 1 blocks
==32124== newarray : 1,552 bytes in 17 blocks
==32124== suppressed: 0 bytes in 0 blocks
==32124==
==32124== ERROR SUMMARY: 35 errors from 35 contexts (suppressed: 0 from 0)
```
| Memory leaks in HeifContext::encode_image_as_hevc? | https://api.github.com/repos/strukturag/libheif/issues/960/comments | 7 | 2023-09-12T06:26:34Z | 2023-12-19T10:20:09Z | https://github.com/strukturag/libheif/issues/960 | 1,891,763,388 | 960 |
[
"strukturag",
"libheif"
]
| @farindk Hi! Sometimes a segmentation fault occurs.
libheif-1.16.2
libvips-8.14.4 vips_thumbnail_buffer vips_image_write_to_buffer
Ubuntu 22.04
heic image is:
[IMG_0512.HEIC.zip](https://github.com/strukturag/libheif/files/12573697/IMG_0512.HEIC.zip)
`Program terminated with signal 11, Segmentation fault.
#0 0x00007f3969ea759a in void std::vector<ColorConversionOperation*, std::allocator<ColorConversionOperation*> >::_M_realloc_insert<ColorConversionOperation*>(__gnu_cxx::__normal_iterator<ColorConversionOperation**, std::vector<ColorConversionOperation*, std::allocator<ColorConversionOperation*> > >, ColorConversionOperation*&&) () from /usr/local/lib64/libheif.so.1
warning: File "/usr/local/lib64/libstdc++.so.6.0.31-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py:/usr/lib/golang/src/runtime/runtime-gdb.py".
Missing separate debuginfos, use: debuginfo-install OpenEXR-libs-1.7.1-8.el7.x86_64 bzip2-libs-1.0.6-13.el7.x86_64 cairo-1.15.12-4.el7.x86_64 cfitsio-3.370-10.el7.x86_64 expat-2.1.0-15.el7_9.x86_64 fontconfig-2.13.0-4.3.el7.x86_64 freetype-2.8-14.el7_9.1.x86_64 fribidi-1.0.2-1.el7_7.1.x86_64 gdk-pixbuf2-2.36.12-3.el7.x86_64 graphite2-1.3.10-1.el7_3.x86_64 harfbuzz-1.7.5-2.el7.x86_64 hdf5-1.8.12-13.el7.x86_64 ilmbase-1.0.3-7.el7.x86_64 jbigkit-libs-2.0-11.el7.x86_64 lcms2-2.6-3.el7.x86_64 libICE-1.0.9-9.el7.x86_64 libSM-1.2.2-2.el7.x86_64 libX11-1.6.7-4.el7_9.x86_64 libXau-1.0.8-2.1.el7.x86_64 libXext-1.3.3-3.el7.x86_64 libXrender-0.9.10-1.el7.x86_64 libXt-1.1.5-3.el7.x86_64 libaec-1.0.4-1.el7.x86_64 libblkid-2.23.2-65.el7_9.1.x86_64 libcroco-0.6.12-6.el7_9.x86_64 libexif-0.6.22-2.el7_9.x86_64 libffi-3.0.13-19.el7.x86_64 libglvnd-1.0.1-0.8.git5baa1e5.el7.x86_64 libglvnd-egl-1.0.1-0.8.git5baa1e5.el7.x86_64 libglvnd-glx-1.0.1-0.8.git5baa1e5.el7.x86_64 libgsf-1.14.26-7.el7.x86_64 libjpeg-turbo-1.2.90-8.el7.x86_64 libmount-2.23.2-65.el7_9.1.x86_64 libpng-1.5.13-8.el7.x86_64 librsvg2-2.40.20-1.el7.x86_64 libselinux-2.5-15.el7.x86_64 libthai-0.1.14-9.el7.x86_64 libtiff-4.0.3-35.el7.x86_64 libuuid-2.23.2-65.el7_9.1.x86_64 libxcb-1.13-1.el7.x86_64 libxml2-2.9.1-6.el7_9.6.x86_64 matio-1.5.17-3.el7.x86_64 openjpeg-libs-1.5.1-18.el7.x86_64 openjpeg2-2.3.1-3.el7_7.x86_64 openslide-3.4.1-1.el7.x86_64 pango-1.42.4-4.el7_7.x86_64 pcre-8.32-17.el7.x86_64 pixman-0.34.0-1.el7.x86_64 poppler-0.26.5-43.el7.1.x86_64 poppler-glib-0.26.5-43.el7.1.x86_64 sqlite-3.7.17-8.el7_7.1.x86_64 xz-libs-5.2.2-2.el7_9.x86_64 zlib-1.2.7-19.el7_9.x86_64
(gdb) bt
#0 0x00007f3969ea759a in void std::vector<ColorConversionOperation*, std::allocator<ColorConversionOperation*> >::_M_realloc_insert<ColorConversionOperation*>(__gnu_cxx::__normal_iterator<ColorConversionOperation**, std::vector<ColorConversionOperation*, std::allocator<ColorConversionOperation*> > >, ColorConversionOperation*&&) () from /usr/local/lib64/libheif.so.1
#1 0x00007f3969ea65fa in void std::vector<ColorConversionOperation*, std::allocator<ColorConversionOperation*> >::emplace_back<ColorConversionOperation*>(ColorConversionOperation*&&) () from /usr/local/lib64/libheif.so.1
#2 0x00007f3969ea5918 in std::vector<ColorConversionOperation*, std::allocator<ColorConversionOperation*> >::push_back(ColorConversionOperation*&&) () from /usr/local/lib64/libheif.so.1
#3 0x00007f3969ea3086 in ColorConversionPipeline::init_ops() () from /usr/local/lib64/libheif.so.1
#4 0x00007f3969ea3a56 in ColorConversionPipeline::construct_pipeline(ColorState const&, ColorState const&, heif_color_conversion_options const&) () from /usr/local/lib64/libheif.so.1
#5 0x00007f3969ea4cda in convert_colorspace(std::shared_ptr<HeifPixelImage> const&, heif_colorspace, heif_chroma, std::shared_ptr<color_profile_nclx const> const&, int, heif_color_conversion_options const&) ()
from /usr/local/lib64/libheif.so.1
#6 0x00007f3969e63d21 in HeifContext::decode_image_planar(unsigned int, std::shared_ptr<HeifPixelImage>&, heif_colorspace, heif_decoding_options const&, bool) const () from /usr/local/lib64/libheif.so.1
#7 0x00007f3969e668c3 in HeifContext::decode_and_paste_tile_image(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const () from /usr/local/lib64/libheif.so.1
#8 0x00007f3969e7fca7 in Error std::__invoke_impl<Error, Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options>(std::__invoke_memfun_deref, Error (HeifContext::*&&)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*&&, unsigned int&&, std::shared_ptr<HeifPixelImage>&&, int&&, int&&, heif_decoding_options&&) () from /usr/local/lib64/libheif.so.1
#9 0x00007f3969e7fa78 in std::__invoke_result<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options>::type std::__invoke<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options>(Error (HeifContext::*&&)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*&&, unsigned int&&, std::shared_ptr<HeifPixelImage>&&, int&&, int&&, heif_decoding_options&&) () from /usr/local/lib64/libheif.so.1
#10 0x00007f3969e7f84d in Error std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul>) () from /usr/local/lib64/libheif.so.1
#11 0x00007f3969e7f613 in std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >::operator()() () from /usr/local/lib64/libheif.so.1
#12 0x00007f3969e7f276 in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::operator()() const ()
from /usr/local/lib64/libheif.so.1
#13 0x00007f3969e7f05c in std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter> std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>&>(std::__invoke_other, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>&) () from /usr/local/lib64/libheif.so.1
#14 0x00007f3969e7ecc0 in std::enable_if<!std::is_void<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> >::value, std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> >::type std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>&>(std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>&) () from /usr/local/lib64/libheif.so.1
#15 0x00007f3969e7e904 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<Error>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error> >::_M_invoke(std::_Any_data const&) () from /usr/local/lib64/libheif.so.1
#16 0x00007f3969e6f79b in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const () from /usr/local/lib64/libheif.so.1
#17 0x00007f3969e6e347 in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) ()
from /usr/local/lib64/libheif.so.1
#18 0x00007f3969e755b3 in void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) () from /usr/local/lib64/libheif.so.1
---Type <return> to continue, or q <return> to quit---
#19 0x00007f3969e722fb in std::__invoke_result<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>::type std::__invoke<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) () from /usr/local/lib64/libheif.so.1
#20 0x00007f3969e6f5d2 in void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}::operator()() const () from /usr/local/lib64/libheif.so.1
#21 0x00007f3969e7232f in _ZZNSt9once_flag18_Prepare_executionC4IZSt9call_onceIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS3_12_Result_baseENS7_8_DeleterEEvEEPbEJPS4_SC_SD_EEvRS_OT_DpOT0_EUlvE_EERSI_ENKUlvE_clEv () from /usr/local/lib64/libheif.so.1
#22 0x00007f3969e72340 in _ZZNSt9once_flag18_Prepare_executionC4IZSt9call_onceIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS3_12_Result_baseENS7_8_DeleterEEvEEPbEJPS4_SC_SD_EEvRS_OT_DpOT0_EUlvE_EERSI_ENUlvE_4_FUNEv () from /usr/local/lib64/libheif.so.1
#23 0x00007f39770ac953 in pthread_once () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S:103
#24 0x00007f3969e5d09d in __gthread_once(int*, void (*)()) () from /usr/local/lib64/libheif.so.1
#25 0x00007f3969e6f644 in void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) () from /usr/local/lib64/libheif.so.1
#26 0x00007f3969e6e120 in std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) ()
from /usr/local/lib64/libheif.so.1
#27 0x00007f3969e7df7d in std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::_M_run() () from /usr/local/lib64/libheif.so.1
#28 0x00007f3969e80c37 in void std::__invoke_impl<void, void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*>(std::__invoke_memfun_deref, void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*&&)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*&&) ()
from /usr/local/lib64/libheif.so.1
#29 0x00007f3969e80b96 in std::__invoke_result<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*>::type std::__invoke<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*>(void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*&&)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*&&) () from /usr/local/lib64/libheif.so.1
#30 0x00007f3969e80a05 in void std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) () from /usr/local/lib64/libheif.so.1
#31 0x00007f3969e80922 in std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<---Type <return> to continue, or q <return> to quit---
Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*> >::operator()() () from /usr/local/lib64/libheif.so.1
#32 0x00007f3969e7fed2 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<Error (HeifContext::*)(unsigned int, std::shared_ptr<HeifPixelImage> const&, int, int, heif_decoding_options const&) const, HeifContext const*, unsigned int, std::shared_ptr<HeifPixelImage>, int, int, heif_decoding_options> >, Error>*> > >::_M_run() () from /usr/local/lib64/libheif.so.1
#33 0x00007f396d6d9fbf in execute_native_thread_routine () from /usr/local/lib64/../lib64/libstdc++.so.6
#34 0x00007f39770a71a3 in start_thread (arg=0x7f3955c5b700) at pthread_create.c:309
#35 0x00007f3976dd9fad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
` | Segmentation fault when create a thumbnail from heic image | https://api.github.com/repos/strukturag/libheif/issues/957/comments | 4 | 2023-09-11T08:16:06Z | 2023-09-12T01:45:41Z | https://github.com/strukturag/libheif/issues/957 | 1,889,937,230 | 957 |
[
"strukturag",
"libheif"
]
| https://github.com/strukturag/libheif/blob/d6e233595ca283eecd649d74f7b35762957ec4a6/libheif/plugins/encoder_svt.cc#L675
error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax
This seems to be throwing an error with Visual C++ 2022.
I hit the error trying to enable SVT-AV1 in https://github.com/conda-forge/libheif-feedstock/pull/9 | Usage of non-standard explicit type conversion syntax | https://api.github.com/repos/strukturag/libheif/issues/956/comments | 2 | 2023-09-11T01:54:07Z | 2023-12-19T03:01:05Z | https://github.com/strukturag/libheif/issues/956 | 1,889,481,158 | 956 |
[
"strukturag",
"libheif"
]
| Could you expose `HeifFile::get_item_type()` and `HeifFile::get_content_type()` as functions in public C-API?
I need to know compression format of image but without these functions I can't calculate it. | Feature request: Add functions to get item's `type` and `content_type` | https://api.github.com/repos/strukturag/libheif/issues/954/comments | 2 | 2023-09-06T20:01:42Z | 2023-11-01T18:41:55Z | https://github.com/strukturag/libheif/issues/954 | 1,884,669,051 | 954 |
[
"strukturag",
"libheif"
]
| We noticed that our application sometimes tends to crash shortly after startup when decoding multiple images through libheif at once (from multiple threads). Our application doesn't call `heif_init()` on startup - from my understanding there is a potential race condition in `ColorConversionPipeline::init_ops()`: Two threads (or more) might write to the `std::vector` at the same time:
https://github.com/strukturag/libheif/blob/d6e233595ca283eecd649d74f7b35762957ec4a6/libheif/color-conversion/colorconversion.cc#L213
```console
./heifrc
zsh: segmentation fault ./heifrc
```
**Tested versions:** Current `master` (d6e233595ca283eecd649d74f7b35762957ec4a6) and v1.16.2
**Steps:**
1. `gcc $(pkg-config --libs --cflags libheif) -o heifrc reproducer.c`
2. Run `./heifrc` a couple of times. It should crash eventually.
**Stacktrace:**
```c
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x00000001001389b0 libheif.1.dylib`ColorConversionPipeline::init_ops() + 84
frame #1: 0x0000000100139f28 libheif.1.dylib`ColorConversionPipeline::construct_pipeline(ColorState const&, ColorState const&, heif_color_conversion_options const&) + 180
frame #2: 0x000000010013b020 libheif.1.dylib`convert_colorspace(std::__1::shared_ptr<HeifPixelImage> const&, heif_colorspace, heif_chroma, std::__1::shared_ptr<color_profile_nclx const> const&, int, heif_color_conversion_options const&) + 492
frame #3: 0x0000000100121f38 libheif.1.dylib`HeifContext::decode_image_planar(unsigned int, std::__1::shared_ptr<HeifPixelImage>&, heif_colorspace, heif_decoding_options const&, bool) const + 5088
frame #4: 0x00000001001209a0 libheif.1.dylib`HeifContext::decode_image_user(unsigned int, std::__1::shared_ptr<HeifPixelImage>&, heif_colorspace, heif_chroma, heif_decoding_options const&) const + 60
frame #5: 0x0000000100112898 libheif.1.dylib`heif_decode_image + 228
frame #6: 0x0000000100003de4 heifrc`decode_heic + 248
frame #7: 0x0000000198a1ffa8 libsystem_pthread.dylib`_pthread_start + 148
```
**Reproducer:**
[test.heic.zip](https://github.com/strukturag/libheif/files/12485118/test.heic.zip)
```c
#include <libheif/heif.h>
#include <stdio.h>
#include <pthread.h>
void* decode_heic(void* arg) {
const char* filename = (const char*)arg;
struct heif_context* ctx = heif_context_alloc();
// Read the HEIC file
struct heif_error err = heif_context_read_from_file(ctx, filename, NULL);
if (err.code != heif_error_Ok) {
fprintf(stderr, "Error reading HEIC file: %s\n", err.message);
return NULL;
}
struct heif_image_handle* handle = NULL;
err = heif_context_get_primary_image_handle(ctx, &handle);
if (err.code != heif_error_Ok) {
fprintf(stderr, "Error getting image handle: %s\n", err.message);
return NULL;
}
struct heif_image* img = NULL;
err = heif_decode_image(handle, &img, heif_colorspace_RGB, heif_chroma_interleaved_RGB, NULL);
if (err.code != heif_error_Ok) {
fprintf(stderr, "Error decoding image: %s\n", err.message);
return NULL;
}
// clean up
heif_image_handle_release(handle);
heif_image_release(img);
heif_context_free(ctx);
return NULL;
}
int main() {
pthread_t thread1, thread2;
// Decode two HEIC images in parallel
pthread_create(&thread1, NULL, decode_heic, "test.heic");
pthread_create(&thread2, NULL, decode_heic, "test.heic");
// Wait for both threads to finish
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
return 0;
}
``` | Race condition: ColorConversionPipeline::init_ops() | https://api.github.com/repos/strukturag/libheif/issues/950/comments | 0 | 2023-08-31T10:52:17Z | 2023-10-09T09:15:33Z | https://github.com/strukturag/libheif/issues/950 | 1,875,282,587 | 950 |
[
"strukturag",
"libheif"
]
| hi:
will libheif has a scope to support gif2avif with animation features?
https://github.com/libvips/libvips/issues/3629
thank you very much!!! | Add support for animated HEIC and AVIF when libheif has this feature | https://api.github.com/repos/strukturag/libheif/issues/949/comments | 2 | 2023-08-28T11:55:00Z | 2023-08-28T22:51:02Z | https://github.com/strukturag/libheif/issues/949 | 1,869,612,149 | 949 |
[
"strukturag",
"libheif"
]
| @dukesook
```
[71/94] Building CXX object libheif/CMakeFiles/heif.dir/plugins/encoder_openjpeg.cc.obj
C:/msys64/home/kmilos/libheif/libheif/plugins/encoder_openjpeg.cc: In function 'heif_error opj_enc
ode_image(void*, const heif_image*, heif_image_input_class)':
C:/msys64/home/kmilos/libheif/libheif/plugins/encoder_openjpeg.cc:486:28: warning: 'opj_image_comp
tparm::bpp' is deprecated: Use prec instead [-Wdeprecated-declarations]
486 | component_params[comp].bpp = bpp;
| ^~~
In file included from C:/msys64/home/kmilos/libheif/libheif/plugins/encoder_openjpeg.cc:26:
C:/msys64/ucrt64/include/openjpeg-2.5/openjpeg.h:754:5: note: declared here
754 | OPJ_DEPRECATED_STRUCT_MEMBER(OPJ_UINT32 bpp, "Use prec instead");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/kmilos/libheif/libheif/plugins/encoder_openjpeg.cc:486:28: warning: 'opj_image_comp
tparm::bpp' is deprecated: Use prec instead [-Wdeprecated-declarations]
486 | component_params[comp].bpp = bpp;
| ^~~
C:/msys64/ucrt64/include/openjpeg-2.5/openjpeg.h:754:5: note: declared here
754 | OPJ_DEPRECATED_STRUCT_MEMBER(OPJ_UINT32 bpp, "Use prec instead");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/kmilos/libheif/libheif/plugins/encoder_openjpeg.cc:486:28: warning: 'opj_image_comp
tparm::bpp' is deprecated: Use prec instead [-Wdeprecated-declarations]
486 | component_params[comp].bpp = bpp;
| ^~~
C:/msys64/ucrt64/include/openjpeg-2.5/openjpeg.h:754:5: note: declared here
754 | OPJ_DEPRECATED_STRUCT_MEMBER(OPJ_UINT32 bpp, "Use prec instead");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
``` | Deprecated features used in OpenJPEG codec | https://api.github.com/repos/strukturag/libheif/issues/947/comments | 0 | 2023-08-22T10:51:35Z | 2023-10-18T09:14:03Z | https://github.com/strukturag/libheif/issues/947 | 1,861,202,541 | 947 |
[
"strukturag",
"libheif"
]
| In the output of #941 I see
````
Jpeg (JPEG decoder): not found
Jpeg (JPEG encoder): not found
````
but further down
````
Compiling 'jpegdec' as built-in backend
Compiling 'jpegenc' as built-in backend
````
This does not fit together. | libjpeg not found, but plugin is built | https://api.github.com/repos/strukturag/libheif/issues/942/comments | 0 | 2023-08-16T14:14:49Z | 2023-08-16T14:14:49Z | https://github.com/strukturag/libheif/issues/942 | 1,853,340,111 | 942 |
[
"strukturag",
"libheif"
]
|
root@dvasilevskiy:/home/dvasilevskiy/libheif/build# cmake --preset=release ..
-- Found LIBDE265
libde265 (HEIC decoder): found (built-in)
-- Found X265
x265 (HEIC encoder): found (built-in)
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
WARNING: MISSING PACKAGE
We could not find development headers for KVAZAAR. Do you have the
necessary dev package installed? This package is NOT REQUIRED and you may
ignore this warning but by doing so you may miss some functionality of
libheif.
Relevant CMake configuration variables:
KVAZAAR_INCLUDE_DIR=<not found>
KVAZAAR_LIBRARY=<not found>
You may use CMake GUI, cmake -D or ccmake to modify the values. Delete
CMakeCache.txt to discard all values and force full re-detection if
necessary.
Call Stack (most recent call first):
cmake/modules/Findkvazaar.cmake:19 (libfind_process)
CMakeLists.txt:74 (find_package)
CMakeLists.txt:93 (plugin_option)
-- Could NOT find kvazaar (missing: KVAZAAR_INCLUDE_DIR KVAZAAR_LIBRARIES)
kvazaar (kvazaar HEVC encoder): not found
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
WARNING: MISSING PACKAGE
We could not find development headers for DAV1D. Do you have the necessary
dev package installed? This package is NOT REQUIRED and you may ignore this
warning but by doing so you may miss some functionality of libheif.
Relevant CMake configuration variables:
DAV1D_INCLUDE_DIR=<not found>
DAV1D_LIBRARY=<not found>
You may use CMake GUI, cmake -D or ccmake to modify the values. Delete
CMakeCache.txt to discard all values and force full re-detection if
necessary.
Call Stack (most recent call first):
cmake/modules/FindDAV1D.cmake:17 (libfind_process)
CMakeLists.txt:74 (find_package)
CMakeLists.txt:100 (plugin_option)
-- Could NOT find DAV1D (missing: DAV1D_INCLUDE_DIR DAV1D_LIBRARIES)
Dav1d (AVIF decoder): not found
-- Found AOM
aom (AVIF encoder): found (built-in)
aom (AVIF decoder): found (built-in)
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
WARNING: MISSING PACKAGE
We could not find development headers for SvtEnc. Do you have the
necessary dev package installed? This package is NOT REQUIRED and you may
ignore this warning but by doing so you may miss some functionality of
libheif.
Relevant CMake configuration variables:
SvtEnc_INCLUDE_DIR=<not found>
SvtEnc_LIBRARY=<not found>
You may use CMake GUI, cmake -D or ccmake to modify the values. Delete
CMakeCache.txt to discard all values and force full re-detection if
necessary.
Call Stack (most recent call first):
cmake/modules/FindSvtEnc.cmake:17 (libfind_process)
CMakeLists.txt:74 (find_package)
CMakeLists.txt:103 (plugin_option)
-- Could NOT find SvtEnc (missing: SvtEnc_INCLUDE_DIR SvtEnc_LIBRARIES)
Svt-av1 (AVIF encoder): not found
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
WARNING: MISSING PACKAGE
We could not find development headers for RAV1E. Do you have the necessary
dev package installed? This package is NOT REQUIRED and you may ignore this
warning but by doing so you may miss some functionality of libheif.
Relevant CMake configuration variables:
RAV1E_INCLUDE_DIR=<not found>
RAV1E_LIBRARY=<not found>
You may use CMake GUI, cmake -D or ccmake to modify the values. Delete
CMakeCache.txt to discard all values and force full re-detection if
necessary.
Call Stack (most recent call first):
cmake/modules/FindRAV1E.cmake:17 (libfind_process)
CMakeLists.txt:74 (find_package)
CMakeLists.txt:104 (plugin_option)
-- Could NOT find RAV1E (missing: RAV1E_INCLUDE_DIR RAV1E_LIBRARIES)
Rav1e (AVIF encoder): not found
Jpeg (JPEG decoder): not found
Jpeg (JPEG encoder): not found
OpenJPEG_Encoder (JPEG2000 encoder): not found
OpenJPEG_Decoder (JPEG2000 decoder): not found
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
WARNING: MISSING PACKAGE
We could not find development headers for LIBSHARPYUV. Do you have the
necessary dev package installed? This package is NOT REQUIRED and you may
ignore this warning but by doing so you may miss some functionality of
libheif.
Relevant CMake configuration variables:
LIBSHARPYUV_INCLUDE_DIR=<not found>
LIBSHARPYUV_LIBRARY=<not found>
You may use CMake GUI, cmake -D or ccmake to modify the values. Delete
CMakeCache.txt to discard all values and force full re-detection if
necessary.
Call Stack (most recent call first):
cmake/modules/Findlibsharpyuv.cmake:18 (libfind_process)
CMakeLists.txt:115 (find_package)
-- Could NOT find libsharpyuv (missing: LIBSHARPYUV_INCLUDE_DIR LIBSHARPYUV_LIBRARIES)
libsharpyuv: disabled
Doxygen build started
Conversion and JPEG 2000 box unit tests can only be compiled with full symbol visibility (WITH_REDUCED_VISIBILITY=OFF)
Compiling 'x265' as built-in backend
Compiling 'libde265' as built-in backend
Not compiling 'dav1d' backend
Compiling 'aomdec' as built-in backend
Compiling 'aomenc' as built-in backend
Not compiling 'svtenc' backend
Not compiling 'rav1e' backend
Compiling 'jpegdec' as built-in backend
Compiling 'jpegenc' as built-in backend
Compiling 'OpenJPEG_Decoder' as built-in backend
Compiling 'OpenJPEG_Encoder' as built-in backend
Not compiling 'kvazaar' backend
Not compiling 'libsharpyuv'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dvasilevskiy/libheif/build
If downgrade to version 1.16.1 - all worked, library found | from version 1.16.2 not found OpenJPEG lib | https://api.github.com/repos/strukturag/libheif/issues/941/comments | 6 | 2023-08-16T12:31:07Z | 2023-08-23T10:14:22Z | https://github.com/strukturag/libheif/issues/941 | 1,853,142,873 | 941 |
[
"strukturag",
"libheif"
]
| 
| heif_context_encode_image has a memory leak for heic encoder | https://api.github.com/repos/strukturag/libheif/issues/940/comments | 3 | 2023-08-09T09:49:49Z | 2023-12-19T10:20:23Z | https://github.com/strukturag/libheif/issues/940 | 1,842,877,224 | 940 |
[
"strukturag",
"libheif"
]
| wasm-ld: error: unknown argument: -flat_namespace
em++: error: '/Users/duanyuanyuan/Documents/worker/baidu/bce-multimedia/emsdk/upstream/bin/wasm-ld -o .libs/libde265.0.wasm -flat_namespace -undefined suppress .libs/libde265.0.dylib-master.o -L/Users/duanyuanyuan/Documents/worker/baidu/bce-multimedia/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -lGL -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /var/folders/xf/zkhyhm5d32j3r51_y6kbcxdm0000gn/T/tmpl3gk8b1nlibemscripten_js_symbols.so --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export=stackSave --export=stackRestore --export=stackAlloc --export=__errno_location --export=__get_temp_ret --export=__set_temp_ret --export=__wasm_call_ctors --export-table -z stack-size=65536 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024' failed (returned 1)
make[3]: *** [libde265.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
emmake: error: 'make -j8' failed (returned 2)
| wasm:error: unknown argument: -flat_namespace | https://api.github.com/repos/strukturag/libheif/issues/939/comments | 2 | 2023-08-08T12:40:52Z | 2023-10-09T13:41:52Z | https://github.com/strukturag/libheif/issues/939 | 1,841,235,451 | 939 |
[
"strukturag",
"libheif"
]
| Hello \o
I don't know if it's known already but here are some examples of PNG pictures that heif-enc isn't able to read correctly.
- https://ache.one/datasets_test_imgs_ache/xkcd/1416.png
- https://ache.one/datasets_test_imgs_ache/png_random/computer-icons-space-shuttle-font-keer-imgbin.png
- https://ache.one/datasets_test_imgs_ache/png_random/statue_of_liberty_pngwing.png
- https://ache.one/datasets_test_imgs_ache/png_random/fox_random_pngegg.png
- https://ache.one/datasets_test_imgs_ache/png_random/fox_screaming_pngwing.png
- https://ache.one/datasets_test_imgs_ache/png_random/pizza_sticker_pngwing.png
- https://ache.one/datasets_test_imgs_ache/png_random/coffe_cup_energy_pngwing.png
- https://ache.one/datasets_test_imgs_ache/png_random/mister_avocado_pngwing.png
- https://ache.one/datasets_test_imgs_ache/png_random/pastafarism_monster_pngwing.png
To have an example. Let's convert `mister_avocado` to AVIF and back to PNG again because GH doesn't support AVIF.

I think maybe, the palette chunk of the PNGs isn't correctly interpreted. But it will hardly explains why the image is deformed.
PS: I won't host the images forever so here is a magnet link to download the datasets they are part of:
magnet:?xt=urn:btih:3217ff465d9c13cdbb2f7b1d776ee0f2a152ba54&dn=datasets_test_imgs_ache&tr=udp://tracker.opentrackr.org:1337/announce&tr=https://tracker1.520.jp/announce&tr=udp://tracker.torrent.eu.org:451/announce&tr=http://bt.endpot.com/announce
| A bunch of PNG that heif-enc isn't able to read correctly | https://api.github.com/repos/strukturag/libheif/issues/937/comments | 1 | 2023-08-02T19:22:43Z | 2023-08-03T10:19:30Z | https://github.com/strukturag/libheif/issues/937 | 1,833,773,671 | 937 |
[
"strukturag",
"libheif"
]
| ### Expected
`heif_chroma_422` is one of the downsampling options for `RGB` → `YCbCr` conversion. Like `heif_chroma_420`, it also removes data from `CbCr` channels. So there are should be a way to enable the average downsampling and upsampling.
### Actual result
```bash
$ heif-enc ./cat.png -o ./cat.ss1.avg.avif -q 89 -p chroma=422 -p speed=6 -C average
Could not encode HEIF/AVIF file: Unsupported feature: Unsupported color conversion
```
### Additional
Combining with #935 this leads to that there is no way to decode the image with `bilinear` algorithm. If you set `only_use_preferred_chroma_algorithm`, it will breaks on `heif_chroma_422` images and **there is not way to find actual subsampling of the image before calling `heif_decode_image`**, just as there is no way to set `preferred_chroma_downsampling_algorithm` after calling `heif_decode_image`. If you woudn't set `only_use_preferred_chroma_algorithm`, the `preferred_chroma_downsampling_algorithm` will be ignored. | Chroma downsampling and upsampling algorithms dont't work with `heif_chroma_422` | https://api.github.com/repos/strukturag/libheif/issues/936/comments | 8 | 2023-07-28T16:23:47Z | 2023-12-04T19:22:38Z | https://github.com/strukturag/libheif/issues/936 | 1,826,714,376 | 936 |
[
"strukturag",
"libheif"
]
| ```c
struct heif_color_conversion_options
{
uint8_t version;
// --- version 1 options
enum heif_chroma_downsampling_algorithm preferred_chroma_downsampling_algorithm;
enum heif_chroma_upsampling_algorithm preferred_chroma_upsampling_algorithm;
// When set to 'false', libheif may also use a different algorithm if the preferred one is not available.
uint8_t only_use_preferred_chroma_algorithm;
};
```
### Expected
From the description: the different algorithm will be used when the preferred one is not available. So, if the preferred algorithm is available, it should be used, right?
I'm using the following settings:
```python
p_options.color_conversion_options.preferred_chroma_upsampling_algorithm = 2
p_options.color_conversion_options.only_use_preferred_chroma_algorithm = 0
```
It's set `preferred_chroma_upsampling_algorithm` to `heif_chroma_upsampling_bilinear` The same settings are default, by the way.
### Actual result
<img width="600" src="https://github.com/strukturag/libheif/assets/128982/dcf212b9-2adb-487d-b2aa-b5909ada1fdb">
The decoded image is pixelated in red-to-blue areas (you can use the example from #586), which means that nearest neighbor upsampling is used instead of the preffered.
Despite this (that nearest neighbor is used), if you set `only_use_preferred_chroma_algorithm` to 1 (true), the image will be not so pixelated, which means that `bilinear` algorithm will be used and therefore it is _available_ and therefore is should be used for upsampling if `only_use_preferred_chroma_algorithm` is false.
The same happens with `preferred_chroma_downsampling_algorithm`. | `only_use_preferred_chroma_algorithm` doesn't work as expected | https://api.github.com/repos/strukturag/libheif/issues/935/comments | 2 | 2023-07-28T16:05:30Z | 2023-10-11T09:56:28Z | https://github.com/strukturag/libheif/issues/935 | 1,826,690,595 | 935 |
[
"strukturag",
"libheif"
]
| Hello, currently I'm using Fedora 37 with KDE and Wayland. And I had a problem trying to open some HEIF images with Gwenview with the version 1.16.1 of the library, and when I downgraded to version 1.13.0 it works without problem.
I checked the other plugins, like qt-heif-image-plugin, and it is on latest version.
Let me know which extra information (and how to get it) I can provide.
Cheers. | Newest version isn't able to show images | https://api.github.com/repos/strukturag/libheif/issues/933/comments | 15 | 2023-07-23T20:46:44Z | 2023-07-29T13:04:14Z | https://github.com/strukturag/libheif/issues/933 | 1,817,291,109 | 933 |
[
"strukturag",
"libheif"
]
| Building libheif with plugin support fails on macOS:
```
[ 77%] Linking CXX shared module libheif-svtenc.so
clang: error: invalid argument '-compatibility_version 1.0.0' only allowed with '-dynamiclib'
```
That's because shared modules must not be versioned.
Here is my patch to fix the problem.
```
--- libheif/plugins/CMakeLists.txt.orig 2023-07-22 08:22:16.000000000 +0000
+++ libheif/plugins/CMakeLists.txt
@@ -11,10 +11,12 @@ macro(plugin_compilation name varName op
MODULE ${${optionName}_sources} ${${optionName}_extra_plugin_sources}
../heif_plugin.cc
)
+ if(NOT APPLE)
set_target_properties(heif-${name}
PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
+ endif()
target_compile_definitions(heif-${name}
PUBLIC
LIBHEIF_EXPORTS
``` | Plugins fail to build on macOS | https://api.github.com/repos/strukturag/libheif/issues/929/comments | 1 | 2023-07-22T08:30:37Z | 2023-08-03T18:10:36Z | https://github.com/strukturag/libheif/issues/929 | 1,816,681,679 | 929 |
[
"strukturag",
"libheif"
]
| The `Box_infe` class already contains the `std::string m_item_uri_type` variable, but no getters/setters for it. The
`HeifContext::add_generic_metadata()` function could be easily extended to handle this capability. Would there be interest if I created a pull request for this functionality? | Handling infe items of type 'uri ' | https://api.github.com/repos/strukturag/libheif/issues/928/comments | 3 | 2023-07-21T22:16:35Z | 2024-03-22T15:18:23Z | https://github.com/strukturag/libheif/issues/928 | 1,816,436,078 | 928 |
[
"strukturag",
"libheif"
]
| Question: Does currently most AUX images are in grayscale format or not?
If anyone have non grayscale aux images I will be very appreciated to see such images.
| Are non-grayscale aux images possible(exists somewhere in a wild)? | https://api.github.com/repos/strukturag/libheif/issues/926/comments | 7 | 2023-07-19T22:30:21Z | 2023-07-20T17:15:07Z | https://github.com/strukturag/libheif/issues/926 | 1,812,826,838 | 926 |
[
"strukturag",
"libheif"
]
| I'm trying to compile the project using the `build-emscripten.sh` script to compile to WebAssembly. My goal is to build it into a server-side WebAssembly so that it can be directly embedded in go-libheif (without using CGO).
However, the script always results in the following errors, I have tried multiple versions, including the version in the install script and the latest version, am I doing something wrong?
```
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_class
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_class
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_class
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_bindings
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_function
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_enum
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_enum_value
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_enum
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_enum_value
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_enum
wasm-ld: error: ../libheif/libheif.a(heif.cc.o): undefined symbol: _embind_register_enum_value
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
```
| Emscripten doesn't compile | https://api.github.com/repos/strukturag/libheif/issues/924/comments | 18 | 2023-07-15T11:35:35Z | 2024-07-21T03:55:31Z | https://github.com/strukturag/libheif/issues/924 | 1,806,030,757 | 924 |
[
"strukturag",
"libheif"
]
| This was reported for the Debian package:
```
/<<PKGBUILDDIR>>/libheif/heif_colorconversion.cc: In member function ‘virtual std::shared_ptr<heif::HeifPixelImage> Op_mono_to_RGB24_32::convert_colorspace(const std::shared_ptr<const heif::HeifPixelImage>&, const heif::ColorState&, const heif::ColorConversionOptions&)’:
/<<PKGBUILDDIR>>/libheif/heif_colorconversion.cc:1902:71: error: ‘in_a’ may be used uninitialized [-Werror=maybe-uninitialized]
1902 | out_p[y * out_p_stride + 4 * x + 3] = in_a[x + y * in_a_stride];
| ^
/<<PKGBUILDDIR>>/libheif/heif_colorconversion.cc:1873:26: note: ‘in_a’ was declared here
1873 | const uint8_t* in_y, * in_a;
| ^~~~
cc1plus: all warnings being treated as errors
```
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037730 for details. | Build error with GCC-13 | https://api.github.com/repos/strukturag/libheif/issues/921/comments | 1 | 2023-07-11T07:06:47Z | 2023-07-18T07:01:49Z | https://github.com/strukturag/libheif/issues/921 | 1,798,260,148 | 921 |
[
"strukturag",
"libheif"
]
| There are two parameters for `heif_item_get_property_transform_crop_borders` function which purposes are not clear to me: image_width and image_height. The queued itemId already should have whole information about size. So two questions:
1. Why we need to customize this sizes?
2. What sizes I should pass? The raw bitmap sizes (`ispe_width` and `ispe_height`)? Bitmap sizes after all manipulations applied (width and height)? The current width and height after all already met `irot` and `imir` properties? | What is purposes of image_width and image_height in heif_item_get_property_transform_crop_borders? | https://api.github.com/repos/strukturag/libheif/issues/920/comments | 0 | 2023-07-07T14:13:14Z | 2023-07-07T14:13:14Z | https://github.com/strukturag/libheif/issues/920 | 1,793,623,954 | 920 |
[
"strukturag",
"libheif"
]
| Looking at the code:
https://github.com/strukturag/libheif/blob/6ee6762657cfb0a921860d1a9d4cf36fa0eb5633/libheif/heif.cc#L2002-L2024
### What's happening
`heif_item_get_property_transform_mirror` returns `heif_transform_mirror_direction_horizontal` in many cases, which means that the image should be mirrored horizontally. There is no way to distinguish "image should be mirrored" to "arguments are wrong" cases.
### What I expect to happen
`heif_item_get_property_transform_mirror` shouldn't provide wrong information about heif item. For example, `heif_item_get_property_transform_rotation_ccw` in the same cases returns -1 which is out of valid values range. | heif_item_get_property_transform_mirror return wrong result instead of error | https://api.github.com/repos/strukturag/libheif/issues/919/comments | 0 | 2023-07-07T11:52:34Z | 2023-07-20T15:34:07Z | https://github.com/strukturag/libheif/issues/919 | 1,793,414,548 | 919 |
[
"strukturag",
"libheif"
]
| See https://github.com/strukturag/libheif/pull/915#discussion_r1247530176 | CMake: use {libname}_INCLUDE_DIRS instead of {}_INCLUDE_DIR everywhere | https://api.github.com/repos/strukturag/libheif/issues/917/comments | 0 | 2023-06-30T17:02:20Z | 2023-10-09T09:56:01Z | https://github.com/strukturag/libheif/issues/917 | 1,782,856,990 | 917 |
[
"strukturag",
"libheif"
]
| Hi!
I noticed that there is no version info in libheif.dll file.

I checked it for libheif-1.12.0 and version which is installed by vcpkg (libheif-1.16.2).
At the same time I can see this information for old versions (for example 1.10.0.0).

Version information is critically important for the update procedures.
So, could you check it pls and approve it, if it is an issue?
(Actually, there is the same situation with libde265.dll, there is no version info for last version)
| There is no version info in libheif.dll | https://api.github.com/repos/strukturag/libheif/issues/916/comments | 4 | 2023-06-30T16:52:32Z | 2023-07-11T14:14:21Z | https://github.com/strukturag/libheif/issues/916 | 1,782,846,205 | 916 |
[
"strukturag",
"libheif"
]
| Currently plugins are not loaded if `heif_init` is not called.
This should be changed because it breaks backward compatibility when packaging changes from built-in plugins to external plugins.
#909
| Load plugins even if heif_init is not called | https://api.github.com/repos/strukturag/libheif/issues/914/comments | 0 | 2023-06-26T07:46:06Z | 2023-07-24T21:13:33Z | https://github.com/strukturag/libheif/issues/914 | 1,774,151,150 | 914 |
[
"strukturag",
"libheif"
]
| We still miss the packages for `rav1e` and `svtenc` plugins in the PPA.
@fancycode When you look into this, v1.17.0 will also include the `kvazaar` encoder as an alternative to x265 and `jpeg` (JPEG in HEIF, encoder and decoder). The code for that is already in the 'master' branch.
| PPA for rav1e and svtenc | https://api.github.com/repos/strukturag/libheif/issues/913/comments | 2 | 2023-06-23T08:56:29Z | 2023-06-26T09:58:31Z | https://github.com/strukturag/libheif/issues/913 | 1,771,082,944 | 913 |
[
"strukturag",
"libheif"
]
| My project (OpenImageIO) uses libheif, and my CI jobs pull from your pre-built apt repo like this:
sudo add-apt-repository ppa:strukturag/libde265
sudo add-apt-repository ppa:strukturag/libheif
sudo apt-get -q install -y libheif-dev
Starting two days ago, my hief-related tests started failing with "unsupported codec" errors when I try to read avif files. Looking at my CI records, it seems the failures correspond to the point a couple days ago when grabbing ppa:strukturag/libheif transitioned from getting me 1.14.2 to 1.16.2.
My MacOS CI case uses 1.16.2, but from Homebrew, and it works fine, so I think that the problem is not that there's anything wrong with 1.16.2 per se, but that the new build you are hosting on ppa:strukturag is broken.
| ppa:strukturag/libheif build is broken? | https://api.github.com/repos/strukturag/libheif/issues/912/comments | 5 | 2023-06-23T01:35:59Z | 2023-06-26T06:50:38Z | https://github.com/strukturag/libheif/issues/912 | 1,770,609,475 | 912 |
[
"strukturag",
"libheif"
]
| I can't find any extension or proper solution without converting to an intermediate format.
| Is there any way of using libheif to open HEIC images in vscode? | https://api.github.com/repos/strukturag/libheif/issues/911/comments | 3 | 2023-06-22T12:49:25Z | 2023-06-22T14:49:34Z | https://github.com/strukturag/libheif/issues/911 | 1,769,609,911 | 911 |
[
"strukturag",
"libheif"
]
| I believe depth maps are stored in more than 8b from an iPhone, I'm able to see a far less quantized depth map when using Focos (though still unable to output said depth map at that bitdepth), I believe adding libtiff support and allowing for 16bit output would greatly improve the usability of this already exceptional library.
Is 16b image output on the roadmap?
Thank you for all your work on this. | Feature request: 16b output | https://api.github.com/repos/strukturag/libheif/issues/910/comments | 4 | 2023-06-22T00:18:51Z | 2023-07-20T14:11:11Z | https://github.com/strukturag/libheif/issues/910 | 1,768,702,089 | 910 |
[
"strukturag",
"libheif"
]
| ```
// For backwards compatibility, it is not really necessary to call heif_init(), but if you don't, the plugins
// registered by default may not be freed correctly.
```
With latest versions from PPA without calling `heif_init` I do not see any loaded plugins.
When call it, all works as expected.
Should the description be corrected? | Does the description of the "heif_init" functions is correct? [QUESTION] | https://api.github.com/repos/strukturag/libheif/issues/909/comments | 5 | 2023-06-21T16:10:54Z | 2023-06-26T07:44:26Z | https://github.com/strukturag/libheif/issues/909 | 1,767,950,131 | 909 |
[
"strukturag",
"libheif"
]
| I am trying to convert an image using the wasm build, but the output has distorted colours.
The issue is reproducible on the hosted demo at https://strukturag.github.io/libheif/ but not reproducible with the Mac CLI client (v1.15.1)
File - [IMG20230618143510.heic.zip](https://github.com/strukturag/libheif/files/11817320/IMG20230618143510.heic.zip)
Thanks in Advance !!
<img width="1440" alt="image" src="https://github.com/strukturag/libheif/assets/46242073/2c710611-26e5-4ab3-8316-5046eb358354">
| Conversion Issue: Color channel distorted in resulting image | https://api.github.com/repos/strukturag/libheif/issues/908/comments | 1 | 2023-06-21T12:08:52Z | 2023-07-20T10:02:25Z | https://github.com/strukturag/libheif/issues/908 | 1,767,456,617 | 908 |
[
"strukturag",
"libheif"
]
| I have HEIC files that when I use heif-convert to convert them to JPG show up already as JPG?
will@ubuntu-server:/mnt/photos-gsync/photos/test$ $HOME/heif-convert --list-decoders
HEIC decoders:
- libde265 = libde265 HEVC decoder, version 1.0.12
AVIF decoders:
JPEG decoders:
- jpeg = libjpeg-turbo 2.1.2 (libjpeg 8.0)
uncompressed: yes
will@ubuntu-server:/mnt/photos-gsync/photos/test$ $HOME/heif-convert IMG_1033.heic IMG_1033.jpg
Input file 'IMG_1033.heic' is a JPEG image
will@ubuntu-server:/mnt/photos-gsync/photos/test$
| HEIC are JPG? | https://api.github.com/repos/strukturag/libheif/issues/907/comments | 2 | 2023-06-20T10:50:10Z | 2023-06-20T11:09:15Z | https://github.com/strukturag/libheif/issues/907 | 1,765,141,865 | 907 |
[
"strukturag",
"libheif"
]
| The code in decoder_jpeg.cc [always produces 420 images](https://github.com/strukturag/libheif/blob/ab524d2d47ac7c39055113d99197afbee6c96144/libheif/plugins/decoder_jpeg.cc#L220) even if the source is 444 or 422. Moreover, it doesn't do downsampling by averaging 4 chroma values, but simply discards every other chroma value!
Even when reading 420 files, it produces slightly wrong results, because libjpeg outputs upsampled values using bilinear upsampling (called "fancy upsampling" in the api). Keeping every other upsampled value is therefore different from using the original 420 samples.
There are several ways around this. One is to check the jpeg's sampling factor (`cinfo.comp_info[i].h_samp_factor` and `cinfo.comp_info[i].v_samp_factor for` i in 0..2). If it's 444, read all the samples. If it's 420, you can set `cinfo.do_fancy_upsampling` to false after the call to `jpeg_read_header()` and then keep every other sample as is done currently. 422 would be similar.
Another way would be to request RGB from the API (`cinfo.out_color_space = JCS_RGB`) instead of reading it as YCbCr.
Yet another way is to use the raw sample reading api which does not do any transform or upsampling, using `cinfo->raw_data_out = TRUE;` and `jpeg_read_raw_data()` as is done [in libavif here](https://github.com/AOMediaCodec/libavif/blob/430ea2df584dcb95ff1632c17643ebbbb2f3bc81/apps/shared/avifjpeg.c#L47).
What do you think? My preference would go for the first or second option. | heif-enc always reads jpeg files as 420 | https://api.github.com/repos/strukturag/libheif/issues/906/comments | 9 | 2023-06-20T08:35:02Z | 2023-06-20T15:38:43Z | https://github.com/strukturag/libheif/issues/906 | 1,764,922,232 | 906 |
[
"strukturag",
"libheif"
]
| See https://github.com/strukturag/libheif/actions/runs/5319429805/jobs/9631916197 for details.
Probably caused by the switch to cmake. I might find some time the next days to investigate, but feel free to resolve this if you have a quick fix. | Building for Coverity Scan is broken | https://api.github.com/repos/strukturag/libheif/issues/905/comments | 0 | 2023-06-20T07:21:41Z | 2023-06-20T07:21:41Z | https://github.com/strukturag/libheif/issues/905 | 1,764,807,945 | 905 |
[
"strukturag",
"libheif"
]
| The current logic only copies the first row of pixels. That works for the tests, because its vertical bars, but is not valid in general.
I am working on a revised approach that will also handle subsampling (422, 420). | uncompressed decode for component order is incorrect | https://api.github.com/repos/strukturag/libheif/issues/904/comments | 1 | 2023-06-20T01:18:58Z | 2024-08-10T01:15:06Z | https://github.com/strukturag/libheif/issues/904 | 1,764,458,168 | 904 |
[
"strukturag",
"libheif"
]
| When compiling static library [v1.16.2](https://github.com/strukturag/libheif/releases/tag/v1.16.2) with CMake and Visual Studio 2019, all the libheif functions are being exported.
This causes all consumers of this library to have a large list of libheif functions exported from resulting executables.
I see that setting the `BUILD_SHARED_LIBS=Off` option does not result in a macro definition `LIBHEIF_STATIC_BUILD` .
Setting `LIBHEIF_STATIC_BUILD` manually causes compiler errors.
```cpp
#if defined(_MSC_VER) && !defined(LIBHEIF_STATIC_BUILD)
#ifdef LIBHEIF_EXPORTS
#define LIBHEIF_API __declspec(dllexport)
#else
#define LIBHEIF_API __declspec(dllimport)
#endif
#elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
#ifdef LIBHEIF_EXPORTS
#define LIBHEIF_API __attribute__((__visibility__("default")))
#else
#define LIBHEIF_API
#endif
#else
#define LIBHEIF_API
#endif
``` | All library functions being exported with BUILD_SHARED_LIBS=Off on MSVC | https://api.github.com/repos/strukturag/libheif/issues/902/comments | 1 | 2023-06-17T18:28:20Z | 2023-08-07T14:56:30Z | https://github.com/strukturag/libheif/issues/902 | 1,761,950,995 | 902 |
[
"strukturag",
"libheif"
]
| First, thank you for creating this library! I have created a Go library around it (https://github.com/klippa-app/go-libheif) to do the processing in a separate process since I don't trust CGO too much :smile:
My question is what the update policy is regarding the PPA, also with possible security issues, like #794. I see that the latest version in the PPA is v1.14.2, I would like to update to the latest version. If the major release strategy is specific per Ubuntu release, would it be possible to backport security fixes to patch version, for example in a v1.14.3? | PPA update policy | https://api.github.com/repos/strukturag/libheif/issues/899/comments | 5 | 2023-06-16T13:36:54Z | 2023-06-20T10:48:35Z | https://github.com/strukturag/libheif/issues/899 | 1,760,657,080 | 899 |
[
"strukturag",
"libheif"
]
| # Background
Since libaom has optimized the time consumption and image size in version 3.0.0+, we consider upgrading libaom to version 3.6.0;
# Question
Using the same image, under the same heif-enc\lieheif version, it is found that after upgrading libaom the quality and image size are quite different.
## Environment
ubuntu 20.04
libheif version: 1.14.2
## Original image

image_size = 17688
## Command
`heif-enc ori.jpg -p quality=50 -A -o dest.avif`
## Result
[dest_avif.zip](https://github.com/strukturag/libheif/files/11733656/dest_avif.zip)
#### aom 2.0.0 version
```
heif-enc -A --list-encoders
aom = AOMedia Project AV1 Encoder v2.0.0
```
image_size = 14514
#### aom 3.6.0 version
```
heif-enc -A --list-encoders
aom = AOMedia Project AV1 Encoder v3.6.0
```
image_size = 7251
The image size and quality of the new version have deteriorated a lot.
## Confuse
I try to use `heif-enc -A -P`,found that the default parameters are the same.
So I'm confused that is this normal, or my parameters are wrong ? | the quality \ the filesize of different libaom versions are quite different. | https://api.github.com/repos/strukturag/libheif/issues/895/comments | 7 | 2023-06-13T10:19:40Z | 2023-06-20T14:41:46Z | https://github.com/strukturag/libheif/issues/895 | 1,754,542,921 | 895 |
[
"strukturag",
"libheif"
]
| Will libheif support CUDA encoding and decoding in the future? | Will libheif support CUDA encoding and decoding in the future? | https://api.github.com/repos/strukturag/libheif/issues/894/comments | 8 | 2023-06-11T13:39:00Z | 2024-02-04T20:33:18Z | https://github.com/strukturag/libheif/issues/894 | 1,751,432,572 | 894 |
[
"strukturag",
"libheif"
]
| How do I obtain binary data of encoded images
For example: obtain the complete binary data of HEIC through the context object after encoding HEVC
I tried using the following code:
```
StreamWriter swriter;
context_->context->write(swriter);
std::vector<uint8_t> data = swriter.get_data();
```
But there was an error during compilation:
**undefined reference to ` HeifContext:: write (StreamWriter&) '** | How do I obtain binary data of encoded images | https://api.github.com/repos/strukturag/libheif/issues/892/comments | 16 | 2023-06-07T14:00:00Z | 2023-06-11T08:44:52Z | https://github.com/strukturag/libheif/issues/892 | 1,745,981,116 | 892 |
[
"strukturag",
"libheif"
]
| From #356 and https://github.com/strukturag/libheif/commit/b3989b8f3573d73a149e787ba6246a02903d4c8b , there is unused code in https://github.com/strukturag/libheif/blob/252c2228225d1836f50f3f80d9dd27909ae75f4c/libheif/file.cc#L1118-L1124
There is a TODO item remaining: https://github.com/strukturag/libheif/blob/252c2228225d1836f50f3f80d9dd27909ae75f4c/libheif/context.cc#L2180-L2181
There are some options for the way forward here:
- remove that code
- use EXIF/XMP or some other metadata approach
- write a custom (`uuid`) box. | writing library identifier | https://api.github.com/repos/strukturag/libheif/issues/889/comments | 0 | 2023-06-04T01:46:15Z | 2023-06-04T01:46:56Z | https://github.com/strukturag/libheif/issues/889 | 1,740,054,925 | 889 |
[
"strukturag",
"libheif"
]
| HEIF-v2 includes the 1pic brand to denote when a file only contains "one image".
What should this mean exactly? Is a grid image that is composed of several images also a 1pic? My interpretation would be yes, because otherwise most images from phones would not be compatible even though they appear to the user as clearly one image one.
Does a thumbnail count? Attached aux image?
(see #885) | 1pic compatible brand | https://api.github.com/repos/strukturag/libheif/issues/888/comments | 2 | 2023-06-03T11:55:46Z | 2023-06-04T01:00:55Z | https://github.com/strukturag/libheif/issues/888 | 1,739,468,895 | 888 |
[
"strukturag",
"libheif"
]
| ISO/IEC 23008-12:2022 Section 10.2.5 defines the `1pic` brand.
The short version is a single intra-coded image.
Subtasks:
- [x] Add brand
- [x] Add check for brand compatibility on write | Support 1pic brand on write | https://api.github.com/repos/strukturag/libheif/issues/884/comments | 0 | 2023-06-03T04:02:38Z | 2023-06-03T11:51:06Z | https://github.com/strukturag/libheif/issues/884 | 1,739,135,517 | 884 |
[
"strukturag",
"libheif"
]
| See ISO/IEC 23008-12:2022 Section 6.5.13
One potential use for this is in calculating image masks on a reduced resolution image. Likely other scaling applications.
Subtasks:
- [ ] Add `Box_iscl`
- [ ] Implement scaling / unscaling
- [ ] Add to processing chain
- [ ] Add tests | Support iscl transformation | https://api.github.com/repos/strukturag/libheif/issues/883/comments | 0 | 2023-06-03T03:25:51Z | 2023-06-03T03:29:52Z | https://github.com/strukturag/libheif/issues/883 | 1,739,115,697 | 883 |
[
"strukturag",
"libheif"
]
| We should have a function that allows to query the internal colorspace/chroma of an image before we actually decode this.
This might be useful to specify the desired output colorspace depending on the coded image (e.g. RGB or monochrome output). See #636.
This is complicated by the fact that the image may have transformations applied are is a derived image (overlay) what may require a change in the internal colorspace.
| Provide API to query colorspace/chroma before decoding | https://api.github.com/repos/strukturag/libheif/issues/879/comments | 0 | 2023-05-31T10:16:12Z | 2023-05-31T10:16:12Z | https://github.com/strukturag/libheif/issues/879 | 1,733,865,252 | 879 |
[
"strukturag",
"libheif"
]
| When trying to update my Arch installation today, I got this error message:
> $ yay -Syu
> :: Synchronizing package databases...
> core 134.1 KiB 272 KiB/s 00:00 [##############################] 100%
> extra 8.3 MiB 6.90 MiB/s 00:01 [##############################] 100%
> community is up to date
> multilib is up to date
> :: Starting full system upgrade...
> resolving dependencies...
> looking for conflicting packages...
> error: failed to prepare transaction (could not satisfy dependencies)
> :: installing libheif (1.16.2-1) breaks dependency 'libheif=1.16.1' required by lib32-libheif
> :: installing rav1e (0.6.6-1) breaks dependency 'rav1e=0.6.3' required by lib32-rav1e
> -> error refreshing databases - exit status 1
Telling pacman to ignore the two packages for upgrading makes the system upgrade work:
`$ yay -Syu --ignore libheif,rav1e` | Dependency issues updating on Arch | https://api.github.com/repos/strukturag/libheif/issues/876/comments | 1 | 2023-05-28T17:50:48Z | 2023-05-28T18:21:35Z | https://github.com/strukturag/libheif/issues/876 | 1,729,588,281 | 876 |
[
"strukturag",
"libheif"
]
| Given this heic file 👇
https://static.elias.ink/resource/Elasticsearch-Logo-Color-V.heic
Convert it in this app (png) 👇
https://catdad-experiments.github.io/heic-app/
And you will see the alpha channel disappear 🪄 and be replaced with black
I also see the same thing when I use this CLI
https://github.com/catdad-experiments/heic-cli
And this code sandbox 👇
https://codesandbox.io/s/heic-conversion-forked-4sm6mr
All these examples use the compiled JS. I cannot confirm the `libheif` version they are using but I can confirm I'm seeing the same thing locally using
https://github.com/catdad-experiments/libheif-js
And it's using v1.15.1
I have confirmed that installing and using this library directly has no issues converting the image to a PNG with the proper alpha channel
Any idea whats going on here?
@catdad @farindk | Compiled JS potentially mishandeling alpha channel | https://api.github.com/repos/strukturag/libheif/issues/875/comments | 0 | 2023-05-26T23:19:41Z | 2024-01-12T23:54:57Z | https://github.com/strukturag/libheif/issues/875 | 1,728,337,799 | 875 |
[
"strukturag",
"libheif"
]
| ```
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /opt/local/bin/g++-mp-12
-- Check for working CXX compiler: /opt/local/bin/g++-mp-12 - broken
CMake Error at /opt/local/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"/opt/local/bin/g++-mp-12"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_libheif/libheif/work/build/CMakeFiles/CMakeScratch/TryCompile-8yMDjB
Run Build Command(s):/opt/local/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_aa57a/fast && /usr/bin/make -f CMakeFiles/cmTC_aa57a.dir/build.make CMakeFiles/cmTC_aa57a.dir/build
Building CXX object CMakeFiles/cmTC_aa57a.dir/testCXXCompiler.cxx.o
/opt/local/bin/g++-mp-12 -pipe -Os -Wno-nonportable-include-path -Wno-error=nonportable-include-path -Wno-error=unknown-warning-option -Wno-unknown-warning-option -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -o CMakeFiles/cmTC_aa57a.dir/testCXXCompiler.cxx.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_libheif/libheif/work/build/CMakeFiles/CMakeScratch/TryCompile-8yMDjB/testCXXCompiler.cxx
cc1plus: error: '-Wno-error=nonportable-include-path': no option '-Wnonportable-include-path'
cc1plus: error: '-Wno-error=unknown-warning-option': no option '-Wunknown-warning-option'
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option '-Wno-nonportable-include-path' may have been intended to silence earlier diagnostics
make[1]: *** [CMakeFiles/cmTC_aa57a.dir/testCXXCompiler.cxx.o] Error 1
make: *** [cmTC_aa57a/fast] Error 2
``` | 1.16.2 uses clang flags for gcc which breaks the build | https://api.github.com/repos/strukturag/libheif/issues/873/comments | 2 | 2023-05-25T16:10:33Z | 2023-05-25T17:44:04Z | https://github.com/strukturag/libheif/issues/873 | 1,726,114,752 | 873 |
[
"strukturag",
"libheif"
]
| Please pardon my disturbance, I couldn't compile libheif since v1.16.0.
I uses brew [formula](https://github.com/Homebrew/homebrew-core/blob/7a34021a6c0f0ad45d38c463d33435574713a1a1/Formula/libheif.rb) to compile, and get two errors:
```
/tmp/libheif-20230523-31616-1nzbo7y/libheif-1.16.2/libheif/plugins/encoder_rav1e.cc:38:10: fatal error:
'rav1e.h' file not found
#include "rav1e.h"
^~~~~~~~~
1 error generated.
make[2]: *** [libheif/plugins/CMakeFiles/heif-rav1e.dir/encoder_rav1e.cc.o] Error 1
make[1]: *** [libheif/plugins/CMakeFiles/heif-rav1e.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
```
```
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -bundle -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.16.2 -o libheif-svtenc.so "CMakeFiles/heif-svtenc.dir/encoder_svt.cc.o" "CMakeFiles/heif-svtenc.dir/__/heif_plugin.cc.o" -Wl,-rpath,/tmp/libheif-20230523-31616-1nzbo7y/libheif-1.16.2/build/libheif /usr/local/lib/libSvtAv1Enc.dylib ../libheif.1.16.2.dylib
clang: error: invalid argument '-compatibility_version 1.0.0' only allowed with '-dynamiclib'
make[2]: *** [libheif/plugins/libheif-svtenc.so] Error 1
make[1]: *** [libheif/plugins/CMakeFiles/heif-svtenc.dir/all] Error 2
...
make: *** [all] Error 2
```
Environment:
```
HOMEBREW_VERSION: 4.0.19-9-g8aaf99e
CPU: octa-core 64-bit haswell
Clang: 12.0.0 build 1200
macOS: 10.15.7-x86_64
Xcode: 12.4
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
```
Related issue (maybe):
#290
If anyone can help me it would be greatly appreciated! | Build Error with Brew on macOS | https://api.github.com/repos/strukturag/libheif/issues/871/comments | 8 | 2023-05-23T06:34:20Z | 2023-05-23T12:52:57Z | https://github.com/strukturag/libheif/issues/871 | 1,721,311,978 | 871 |
[
"strukturag",
"libheif"
]
| HI,
I installed GraphicsMagick that supports libheif
```
GraphicsMagick: 1.3.40
libheif: 1.16.1
```
```
$gm identify -verbose -debug coder heic.jpg
18:34:14 0:0.002120 0.000u 38929 constitute.c/ReadImage/1676/Coder:
Invoking "HEIC" decoder (HEIF Image Format) subimage=0 subrange=0
18:34:14 0:0.003061 0.000u 38929 heif.c/ReadHEIFImage/486/Coder:
Geometry: 2000x2586
18:34:14 0:0.003079 0.000u 38929 heif.c/ReadHEIFImage/488/Coder:
Matte: False
18:34:14 0:0.003435 0.000u 38929 heif.c/ReadHEIFImage/557/Coder:
heif_decode_image() reports error "Unsupported feature: Unsupported codec"
18:34:14 0:0.003558 0.000u 38929 constitute.c/ReadImage/1702/Coder:
Returned from "HEIC" decoder, returned image is NULL!
gm identify: An error has occurred reading from file (heic.jpg).
gm identify: Request did not return an image.
```
```
$gm identify heic.jpg
heic.jpg HEIC 2000x2586+0+0 DirectClass 8-bit 340.1Ki 0.000u 0m:0.000003s
```
It seems that the installation is successful, but some commands do not support it. Is this normal?
Thanks
| heif_decode_image() reports error "Unsupported feature: Unsupported codec" | https://api.github.com/repos/strukturag/libheif/issues/868/comments | 12 | 2023-05-18T10:44:15Z | 2023-05-29T10:12:32Z | https://github.com/strukturag/libheif/issues/868 | 1,715,414,994 | 868 |
[
"strukturag",
"libheif"
]
| like this: https://static.elias.ink/resource/Elasticsearch-Logo-Color-V.heic | heic to PNG cannot retain the alpha channel | https://api.github.com/repos/strukturag/libheif/issues/867/comments | 1 | 2023-05-18T06:20:01Z | 2023-05-18T10:24:33Z | https://github.com/strukturag/libheif/issues/867 | 1,715,063,109 | 867 |
[
"strukturag",
"libheif"
]
| In order to make naming and usage more consistent, should we introduce `heif-dec` to match the `heif-enc` name? In any case, we would keep `heif-convert` for a long transition period. Even if it is just a symlink.
Also the command line parameters should be more consistent between the two. Especially the use of `-o` should be optional.
| heif-convert -> heif-dec | https://api.github.com/repos/strukturag/libheif/issues/864/comments | 3 | 2023-05-14T11:46:41Z | 2024-06-18T22:44:45Z | https://github.com/strukturag/libheif/issues/864 | 1,708,915,216 | 864 |
[
"strukturag",
"libheif"
]
| I am working with an HEIF based workflow using files captured by my Fuji X-T5. The images open fine in `darktable` and `digikam 8` but exporting to a compressed PNG file is very slow, The Fuji X0T5 produces 40Mpx images normally and it takes over 30 seconds to save the image as a PNG. My machine is no slouch (Ryzen 5950 (16c-32t) + 64GB RAM + Radeon 6750XT) and storage is very fast. `darktable` exports the file and the dialog box goes away after a few seconds, file keeps growing for up to 30s. Exporting to JPG only takes a second to two.
[IMG-20230508-0056.hif.zip](https://github.com/strukturag/libheif/files/11470294/IMG-20230508-0056.hif.zip)
I have attached a sample HEIF image for you to test with. | Fuji X-T5 HEIF Files - Slow export to PNG | https://api.github.com/repos/strukturag/libheif/issues/862/comments | 10 | 2023-05-13T18:18:25Z | 2023-05-15T14:25:27Z | https://github.com/strukturag/libheif/issues/862 | 1,708,704,311 | 862 |
[
"strukturag",
"libheif"
]
| The `heif_item_add_property_user_description(ctx, region_item_id, desc, NULL)` call succeeds and the user annotation appears to have been written to the file.
But `heif_item_get_properties_of_type(ctx, region_item_id, heif_item_property_type_user_description, properties, count)` returns 0 items.
This is due to [get_properties](https://github.com/strukturag/libheif/blob/e411241b9afd0ac96e78045cb5fb815e906f09ff/libheif/heif.cc#L1835) returning an error with the message "Item (ID=2) has no properties assigned to it in ipma box".
The following zip file contains a HEIF image that demonstrates this issue: [test.zip](https://github.com/strukturag/libheif/files/11417748/test.zip)
| User annotations do not work for region items | https://api.github.com/repos/strukturag/libheif/issues/858/comments | 2 | 2023-05-08T04:47:17Z | 2023-05-08T11:08:22Z | https://github.com/strukturag/libheif/issues/858 | 1,699,508,011 | 858 |
[
"strukturag",
"libheif"
]
| Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
^^^^^^^^ | typo in cmake | https://api.github.com/repos/strukturag/libheif/issues/851/comments | 4 | 2023-05-05T07:14:22Z | 2023-05-05T09:35:33Z | https://github.com/strukturag/libheif/issues/851 | 1,697,129,778 | 851 |
[
"strukturag",
"libheif"
]
| <pre>
[ 2%] Building CXX object libheif/CMakeFiles/heif.dir/bitstream.cc.o
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/bitstream.cc: In constructor 'StreamReader_memory::StreamReader_memory(const uint8_t*, int64_t, bool)':
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/bitstream.cc:75:32: warning: conversion from 'int64_t' {aka 'long long int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion]
75 | memcpy(m_owned_data, data, m_length);
| ^~~~~~~~
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/bitstream.cc: In member function 'bool BitstreamRange::read(uint8_t*, int64_t)':
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/bitstream.cc:269:35: warning: conversion from 'int64_t' {aka 'long long int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion]
269 | bool success = istr->read(data, n);
| ^
[ 4%] Building CXX object libheif/CMakeFiles/heif.dir/box.cc.o
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc: In member function 'virtual Error Box_colr::parse(BitstreamRange&)':
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc:1879:34: warning: conversion from 'long long unsigned int' to 'std::vector<unsigned char>::size_type' {aka 'unsigned int'} may change value [-Wconversion]
1879 | std::vector<uint8_t> rawData(profile_size);
| ^~~~~~~~~~~~
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc: In member function 'virtual Error Box_av1C::parse(BitstreamRange&)':
/home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc:3313:24: warning: conversion from 'int64_t' {aka 'long long int'} to 'std::vector<unsigned char>::size_type' {aka 'unsigned int'} may change value [-Wconversion]
3313 | m_config_OBUs.resize(configOBUs_bytes);
| ^~~~~~~~~~~~~~~~
</pre> | compiler warnings on 32-bit environment | https://api.github.com/repos/strukturag/libheif/issues/847/comments | 6 | 2023-05-03T15:35:57Z | 2024-07-10T13:46:27Z | https://github.com/strukturag/libheif/issues/847 | 1,694,323,275 | 847 |
[
"strukturag",
"libheif"
]
| Hi.
libheif 1.16.1 fails to build on our Build System for armv7hl.
Build log core: https://pkgsubmit.mageia.org/uploads/failure/cauldron/core/updates_testing/20230503122542.kekepower.duvel.2207911/libheif-1.16.1-1.1.mga9/build.armv7hl.0.20230503122607.log
Build log tainted: https://pkgsubmit.mageia.org/uploads/failure/cauldron/tainted/updates_testing/20230503122548.kekepower.duvel.2208422/libheif-1.16.1-1.1.mga9.tainted/build.armv7hl.0.20230503122615.log | libheif 1.16.1: Build fails on armv7hl | https://api.github.com/repos/strukturag/libheif/issues/846/comments | 2 | 2023-05-03T14:52:18Z | 2023-05-03T15:31:47Z | https://github.com/strukturag/libheif/issues/846 | 1,694,238,211 | 846 |
[
"strukturag",
"libheif"
]
| error:
```
tar zxvf libheif-1.16.1.tar.gz
...
...
tar: libheif-1.16.1/tests/src/github.com/strukturag/libheif/go: Cannot create symlink to ‘/home/farindk/Projects/libheif/libheif/tests/../go’: No such file or directory
``` | can't untar libheif 1.16.1 with msys2 | https://api.github.com/repos/strukturag/libheif/issues/843/comments | 3 | 2023-05-03T00:06:30Z | 2023-05-03T14:00:06Z | https://github.com/strukturag/libheif/issues/843 | 1,693,238,956 | 843 |
[
"strukturag",
"libheif"
]
| Currently, I use libheif like that :
* I get my private surface data, named for example `data`
* I get the heif `plane` with heif_image_get_plane_readonly()
* i do a double for loop to copy the values of `plane` to my private surface `data`
is it possible to pass my private `data` to heif decoder so that it fills it directly, without doing the extra loops ?
| pass private surface data to heif decoder | https://api.github.com/repos/strukturag/libheif/issues/842/comments | 7 | 2023-05-02T23:25:20Z | 2023-05-04T12:19:18Z | https://github.com/strukturag/libheif/issues/842 | 1,693,214,070 | 842 |
[
"strukturag",
"libheif"
]
| to speedup the search of files, use FindFirstFileEx() with FindExInfoBasic for 2nd parameter. See
https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ne-minwinbase-findex_info_levels
| plugins_windows.cc: use FindFirstFileEx() instead of FindFirstFile() | https://api.github.com/repos/strukturag/libheif/issues/841/comments | 0 | 2023-05-02T23:18:55Z | 2023-05-02T23:18:55Z | https://github.com/strukturag/libheif/issues/841 | 1,693,210,547 | 841 |
[
"strukturag",
"libheif"
]
| ```
[51/58] Linking CXX shared library libheif/libheif.so.1.16.1
ninja: job failed: : && /usr/bin/g++ -fPIC -O2 -Wformat -Werror=format-security -flto=auto -Wl,--as-needed,-O1,--sort-common -shared -Wl,-soname,libheif.so.1 -o libheif/libheif.so.1.16.1 libheif/CMakeFiles/heif.dir/bitstream.cc.o libheif/CMakeFiles/heif.dir/box.cc.o libheif/CMakeFiles/heif.dir/error.cc.o libheif/CMakeFiles/heif.dir/heif.cc.o libheif/CMakeFiles/heif.dir/context.cc.o libheif/CMakeFiles/heif.dir/file.cc.o libheif/CMakeFiles/heif.dir/pixelimage.cc.o libheif/CMakeFiles/heif.dir/hevc.cc.o libheif/CMakeFiles/heif.dir/avif.cc.o libheif/CMakeFiles/heif.dir/plugin_registry.cc.o libheif/CMakeFiles/heif.dir/heif_plugin.cc.o libheif/CMakeFiles/heif.dir/nclx.cc.o libheif/CMakeFiles/heif.dir/init.cc.o libheif/CMakeFiles/heif.dir/metadata_compression.cc.o libheif/CMakeFiles/heif.dir/common_utils.cc.o libheif/CMakeFiles/heif.dir/region.cc.o libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o libheif/CMakeFiles/heif.dir/color-conversion/rgb2yuv.cc.o libheif/CMakeFiles/heif.dir/color-conversion/rgb2yuv_sharp.cc.o libheif/CMakeFiles/heif.dir/color-conversion/yuv2rgb.cc.o libheif/CMakeFiles/heif.dir/color-conversion/rgb2rgb.cc.o libheif/CMakeFiles/heif.dir/color-conversion/monochrome.cc.o libheif/CMakeFiles/heif.dir/color-conversion/hdr_sdr.cc.o libheif/CMakeFiles/heif.dir/color-conversion/alpha.cc.o libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o libheif/CMakeFiles/heif.dir/plugins_unix.cc.o libheif/CMakeFiles/heif.dir/plugins/encoder_x265.cc.o libheif/CMakeFiles/heif.dir/plugins/decoder_libde265.cc.o libheif/CMakeFiles/heif.dir/plugins/decoder_aom.cc.o libheif/CMakeFiles/heif.dir/plugins/encoder_aom.cc.o -ldl /usr/lib/libx265.so /usr/lib/libde265.so /usr/lib/libaom.so /usr/lib/libaom.so /usr/lib/libsharpyuv.so && :
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/rgb2yuv.cc.o (symbol from plugin): in function `Op_RRGGBBxx_HDR_to_YCbCr420::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo name for Op_RGB_to_YCbCr<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/rgb2yuv.cc.o (symbol from plugin): in function `Op_RRGGBBxx_HDR_to_YCbCr420::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo for Op_RGB_to_YCbCr<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/rgb2yuv.cc.o (symbol from plugin): in function `Op_RRGGBBxx_HDR_to_YCbCr420::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo name for Op_RGB_to_YCbCr<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/rgb2yuv.cc.o (symbol from plugin): in function `Op_RRGGBBxx_HDR_to_YCbCr420::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo for Op_RGB_to_YCbCr<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/yuv2rgb.cc.o (symbol from plugin): in function `Op_YCbCr420_to_RGB24::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo name for Op_YCbCr_to_RGB<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/yuv2rgb.cc.o (symbol from plugin): in function `Op_YCbCr420_to_RGB24::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo for Op_YCbCr_to_RGB<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/yuv2rgb.cc.o (symbol from plugin): in function `Op_YCbCr420_to_RGB24::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo name for Op_YCbCr_to_RGB<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/yuv2rgb.cc.o (symbol from plugin): in function `Op_YCbCr420_to_RGB24::state_after_conversion(ColorState const&, ColorState const&, heif_color_conversion_options const&) const':
(.text+0x0): multiple definition of `typeinfo for Op_YCbCr_to_RGB<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo for Op_YCbCr444_to_YCbCr420_average<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo for Op_YCbCr444_to_YCbCr420_average<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo name for Op_YCbCr420_bilinear_to_YCbCr444<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo for Op_YCbCr420_bilinear_to_YCbCr444<unsigned char>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo name for Op_YCbCr420_bilinear_to_YCbCr444<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
/usr/lib/gcc/armv7-alpine-linux-musleabihf/12.2.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: libheif/CMakeFiles/heif.dir/color-conversion/chroma_sampling.cc.o (symbol from plugin): in function `typeinfo name for Op_YCbCr444_to_YCbCr420_average<unsigned char>':
(.text+0x0): multiple definition of `typeinfo for Op_YCbCr420_bilinear_to_YCbCr444<unsigned short>'; libheif/CMakeFiles/heif.dir/color-conversion/colorconversion.cc.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
ninja: subcommand failed
```
this can be worked around with `-Wl,--allow-multiple-definition`, but i'm not sure what actually caused this | 1.16.1 seems to have multiple-definition errors on 32-bit arm | https://api.github.com/repos/strukturag/libheif/issues/840/comments | 6 | 2023-05-02T22:20:07Z | 2023-05-03T07:37:17Z | https://github.com/strukturag/libheif/issues/840 | 1,693,170,500 | 840 |
[
"strukturag",
"libheif"
]
| CMakeList has the following:
```
option(WITH_GDKPIXBUF "Build gdk-pixbuf plugin" ON)
```
Which does not match with:
```
if (WITH_GDK_PIXBUF)
add_subdirectory (gdk-pixbuf)
endif()
```
It has an extra underscore: `WITH_GDK_PIXBUF`. It should be `WITH_GDKPIXBUF`.
Fix:
```
diff -Naur libheif-1.16.0-Source.orig/CMakeLists.txt libheif-1.16.0-Source/CMakeLists.txt
--- libheif-1.16.0-Source.orig/CMakeLists.txt 2023-05-01 10:53:42.000000000 -0600
+++ libheif-1.16.0-Source/CMakeLists.txt 2023-05-02 12:33:04.522277401 -0600
@@ -216,7 +216,7 @@
add_subdirectory (libheif)
-if (WITH_GDK_PIXBUF)
+if (WITH_GDKPIXBUF)
add_subdirectory (gdk-pixbuf)
endif()
`` | libheif 1.16.0: gdk-pifbuf loader does not build. | https://api.github.com/repos/strukturag/libheif/issues/839/comments | 1 | 2023-05-02T18:36:18Z | 2023-05-02T18:37:57Z | https://github.com/strukturag/libheif/issues/839 | 1,692,912,117 | 839 |
[
"strukturag",
"libheif"
]
| Is it intentional that the package is now named `libheif-1.16.0-Source` (compared to the previous version that was named `libheif-1.15.2`? | Package name libheif-1.16.0-Source | https://api.github.com/repos/strukturag/libheif/issues/838/comments | 2 | 2023-05-02T17:54:53Z | 2023-05-02T17:59:04Z | https://github.com/strukturag/libheif/issues/838 | 1,692,847,758 | 838 |
[
"strukturag",
"libheif"
]
| https://github.com/strukturag/libheif/blob/3ec048aef27c9702a79e59478de601799ebd3629/go/heif/heif.go#L477
Is it possible to write the image directly to byte array or io.Writer?
As per this issue https://github.com/strukturag/libheif/issues/560, possible to do in C, can it be done using the existing GO API? | Write image to io.Writer or byte array in GO | https://api.github.com/repos/strukturag/libheif/issues/833/comments | 2 | 2023-04-29T01:52:06Z | 2023-04-29T11:55:30Z | https://github.com/strukturag/libheif/issues/833 | 1,689,313,950 | 833 |
[
"strukturag",
"libheif"
]
| @maryla-uc
I've found a bug in the color conversion tests. The variable `HAVE_LIBSHARPYUV` was not passed to the test code and building of `heif_internal`. Hence, the tests were always built as if `WITH_LIBSHARPYUV=off`.
When this is corrected and we set `WITH_LIBSHARPYUV=ON`, many (all?) tests with conversions through `Any_RGB_to_YCbCr_420_Sharp` fail.
I've noticed this when I tried to clean up the `CMakeLists.txt` files and instead of compiling a separate `heif_internal`, I added another cmake option `WITH_REDUCED_VISIBILITY` to turn on full symbol visibility when it is needed (tests, fuzzers).
I have fixed passing `HAVE_LIBSHARPYUV` to the tests (96fa43c9ddd5eea25f78138af096c209723e00d1) in `new-fuzzers` branch.
But now we have the failing sharpyuv tests.
Could you please have a look why they fail?
(To use the tests, you have to set `WITH_TESTS=ON` and `WITH_REDUCED_VISIBILITY=OFF`.) | sharpyuv color conversion tests failing | https://api.github.com/repos/strukturag/libheif/issues/829/comments | 3 | 2023-04-25T17:39:22Z | 2023-04-26T17:13:38Z | https://github.com/strukturag/libheif/issues/829 | 1,683,582,679 | 829 |
[
"strukturag",
"libheif"
]
| In previous Ubuntu versions, including 22.10, I was able to open HEIF/HEIC files by installing libheif1 and heif-gdk-pixbuf. This does not work anymore in 23.04.
I created an Ubuntu bug report for this at https://bugs.launchpad.net/ubuntu/+source/libheif/+bug/2017420, but also wanted to create one here to be sure. If you feel that this is inappropriate, feel free to close.
Running eog in a terminal displays:
```
$ eog IMG_9996.HEIC
** (eog:44492): WARNING **: 14:29:17.537: Cannot read plugin directory.
(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.537: gdk_pixbuf_animation_is_static_image: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.538: gdk_pixbuf_animation_get_iter: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.538: gdk_pixbuf_animation_iter_get_pixbuf: assertion 'GDK_IS_PIXBUF_ANIMATION_ITER (iter)' failed
** (eog:44492): WARNING **: 14:29:17.543: Cannot read plugin directory.
(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.543: gdk_pixbuf_animation_is_static_image: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.543: gdk_pixbuf_animation_get_iter: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.543: gdk_pixbuf_animation_iter_get_pixbuf: assertion 'GDK_IS_PIXBUF_ANIMATION_ITER (iter)' failed
```
eog then shows `Could not load image “IMG_9996.HEIC”. Image loading failed.`
gpicview even crashes immediately:
```
$ gpicview IMG_9996.HEIC
Gtk-Message: 14:30:30.216: Failed to load module "canberra-gtk-module"
** (gpicview:44624): WARNING **: 14:30:30.260: Cannot read plugin directory.
** (gpicview:44624): WARNING **: 14:30:30.265: Cannot read plugin directory.
Segmentation fault (core dumped)
```
The problem concerns all HEIF/HEIC images I tested.
The installed versions of the (possibly) relevant packages are:
libheif1: 1.14.2-1
heif-gdk-pixbuf: 1.14.2-1
libgdk-pixbuf-2.0-0: 2.42.10+dfsg-1build1
eog: 44.0-1
gpicview: 0.2.5-3build1 | Viewing HEIF/HEIC photos in Ubuntu 23.04/lunar does not work anymore | https://api.github.com/repos/strukturag/libheif/issues/827/comments | 7 | 2023-04-23T12:45:16Z | 2023-05-30T12:09:32Z | https://github.com/strukturag/libheif/issues/827 | 1,680,015,476 | 827 |
[
"strukturag",
"libheif"
]
| With libheif-1.15.2, I'm getting this error:
```
$ file image1.heic
image1.heic: ISO Media, HEIF Image HEVC Main or Main Still Picture Profile
$ heif-convert --list-decoders
HEIC decoders:
- libde265 = libde265 HEVC decoder, version 1.0.9
AVIF decoders:
- dav1d = dav1d v6.6.0
- aom = AOMedia Project AV1 Decoder v3.6.0
$ heif-convert image1.heic image1.jpeg
File contains 1 image
Written to image1.jpeg
$ heif-thumbnailer -s 128x128 image1.heic image1-t.heic
Could not decode HEIF image : Unsupported feature: Unsupported codec
```
Sample image attached (gzipped, otherwise github rejects upload).
[image1.heic.gz](https://github.com/strukturag/libheif/files/11295000/image1.heic.gz)
| heif-thumbnailer unable to proces HEVC-encoded HEIF file | https://api.github.com/repos/strukturag/libheif/issues/825/comments | 1 | 2023-04-21T10:45:45Z | 2023-04-21T11:02:05Z | https://github.com/strukturag/libheif/issues/825 | 1,678,306,303 | 825 |
[
"strukturag",
"libheif"
]
| Hi , when I run `libheif-master/examples/heif-test.go` I encounter this error
```sh
package libheif-master/examples: C source files not allowed when not using cgo or SWIG: test_c_api.c
```
I try to add `import "C"` and run again encounter this
```sh
# github.com/strukturag/libheif/go/heif
/Users/xhkang/go/pkg/mod/github.com/strukturag/[email protected]/go/heif/heif.go:55:25: could not determine kind of name for C.heif_compression_EVC
/Users/xhkang/go/pkg/mod/github.com/strukturag/[email protected]/go/heif/heif.go:53:25: could not determine kind of name for C.heif_compression_JPEG2000
/Users/xhkang/go/pkg/mod/github.com/strukturag/[email protected]/go/heif/heif.go:54:25: could not determine kind of name for C.heif_compression_VVC
/Users/xhkang/go/pkg/mod/github.com/strukturag/[email protected]/go/heif/heif.go:317:27: could not determine kind of name for C.heif_suberror_Encoder_cleanup
/Users/xhkang/go/pkg/mod/github.com/strukturag/[email protected]/go/heif/heif.go:315:28: could not determine kind of name for C.heif_suberror_Encoder_encoding
/Users/xhkang/go/pkg/mod/github.com/strukturag/[email protected]/go/heif/heif.go:313:34: could not determine kind of name for C.heif_suberror_Encoder_initialization
```
Can you help me , I have no idea about this and I'm not familiar with C, thank you! | could not determine kind of name for C.heif_compression_EVC | https://api.github.com/repos/strukturag/libheif/issues/824/comments | 2 | 2023-04-20T16:39:28Z | 2023-05-05T09:21:14Z | https://github.com/strukturag/libheif/issues/824 | 1,677,064,609 | 824 |
[
"strukturag",
"libheif"
]
| https://github.com/strukturag/libheif/blob/master/libheif/heif_context.cc#L912-L916 has code that looks like this:
```
if (refs.size() != 1) {
return Error(heif_error_Invalid_input,
heif_suberror_Unspecified,
"Metadata not correctly assigned to image");
}
```
That seems inconsistent with ISO/IEC 14496-12:2022 Section 8.3.3.3 (or ISO/IEC 14496-12:2015 Section 8.11.12.1, which is essentially the same, although the context is a bit different). In particular, it seems like metadata could apply to more than one item or track (e.g. in a grid derived image, it could apply to many of the grid items).
Is there a reason why we need this limitation? Could we just loop over all the `refs` and assign metadata to each item? | Handle iref with multiple items | https://api.github.com/repos/strukturag/libheif/issues/819/comments | 0 | 2023-04-10T10:15:54Z | 2023-04-10T10:15:54Z | https://github.com/strukturag/libheif/issues/819 | 1,660,566,476 | 819 |
[
"strukturag",
"libheif"
]
| Hi, I am taking a first look at libheif and libde265. I noticed that the README for this project recommends the `frame-parallel` branch of libde265, which has a tip commit from 2019, where `master` has been worked on recently.
Just wondered if the README for this project needs updating. Thanks | libde265 frame-parallel branch still recommended? | https://api.github.com/repos/strukturag/libheif/issues/807/comments | 3 | 2023-04-03T23:49:11Z | 2023-04-22T08:52:40Z | https://github.com/strukturag/libheif/issues/807 | 1,652,930,013 | 807 |
[
"strukturag",
"libheif"
]
| I'm trying to convert a HEIC image file to JPEG format using the heif-convert command, but I'm getting an error "Unsupported feature: Unsupported codec (4.3000)" and the conversion fails. I've also tried using the convert command from ImageMagick to convert the HEIC file to JPEG, but I'm getting a similar error.
Here are the commands I'm running:
**heif-convert sample1.heic abc.jpg**
and
**/usr/local/ImageMagick/bin/convert sample1.heic abc.jpg**
And here are the error messages I'm seeing:
For heif-convert:
**Could not decode image: 0: Unsupported feature: Unsupported codec**
For convert:
**convert: Unsupported feature: Unsupported codec (4.3000) `sample1.heic' @ error/heic.c/IsHEIFSuccess/139.
convert: no images defined `abc.jpg' @ error/convert.c/ConvertImageCommand/3342**
I've already tried updating to the latest version of libheif, but the issue still persists. I've also checked the HEIC file for corruption and tried converting it to other formats, but the issue remains.
Is there anything else I can do to troubleshoot this issue? Are there any additional dependencies or libraries that libheif requires to handle HEIC files with this particular codec?
Any help or guidance on this issue would be greatly appreciated.
Environment:
ImageMagick version
7.1.1-4 Q16-HDRI x86_64 20976
Operating system
centOS
Operating system, version and so on
CentOS Linux release 7.6.1810 (Core)
| Unsupported feature: Unsupported codec" error when using heif-convert on HEIC image | https://api.github.com/repos/strukturag/libheif/issues/800/comments | 6 | 2023-03-22T06:27:18Z | 2023-05-18T01:57:55Z | https://github.com/strukturag/libheif/issues/800 | 1,635,139,860 | 800 |
[
"strukturag",
"libheif"
]
| I apologise for potentially raising the issue in the wrong place, but I would like to ask whether it is feasible to develop libde256 HEIF encoding plugin? There seems to be some encoder code present in libde256, but libheif uses x265 for encoding.
| QUESTION: Using libde256 for HEIF image encoding | https://api.github.com/repos/strukturag/libheif/issues/797/comments | 1 | 2023-03-20T19:47:37Z | 2023-03-21T00:53:10Z | https://github.com/strukturag/libheif/issues/797 | 1,632,757,271 | 797 |
[
"strukturag",
"libheif"
]
| Hi, I am trying to build libheif to be used with AWS Lambda. So we must use amazonlinux:2 Docker image to build. (Yes, it's getting painfully outdated by now, getting dependencies lined up is a real issue.)
Anyway, the library builds fine with autotools. Consider following Dockerfile that builds using autotools:
```Dockerfile
# syntax=docker/dockerfile:1
FROM amazonlinux:2
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN set -eux && \
echo "build: ${BUILDPLATFORM}, target: ${TARGETPLATFORM}" && \
yum makecache && \
amazon-linux-extras install -y epel && \
yum update -y && \
yum install -y \
ca-certificates \
curl tar\
git gcc gcc-c++ make \
libtool automake \
pkgconfig \
glib2-devel \
zlib-devel \
libjpeg-devel \
libjpeg-turbo-devel \
libpng-devel \
libgif-devel \
libtiff-devel \
libexif-devel \
libgsf-devel
ENV VIPSHOME /usr/local/vips
ENV PKG_CONFIG_PATH $VIPSHOME/lib/pkgconfig
ARG LIBHEIF_VERSION=1.15.1
ARG LIBHEIF_URL=https://github.com/strukturag/libheif/releases/download/v${LIBHEIF_VERSION}/libheif-${LIBHEIF_VERSION}.tar.gz
RUN set -eux && \
cd /tmp && \
curl --fail --silent --show-error --location --output libheif-${LIBHEIF_VERSION}.tar.gz "${LIBHEIF_URL}" && \
tar xzf libheif-${LIBHEIF_VERSION}.tar.gz && \
cd libheif-${LIBHEIF_VERSION} && \
./autogen.sh && \
./configure --disable-go --prefix=${VIPSHOME} && \
make && \
make install && \
echo "SUCCESS"
```
Run this with `docker build . --progress=plain `. You will see something like this at the end of build process:
(Note the dockerfile uses buildkit process so we can build for linux/amd64 as well as linux/arm64 - locally for M1 chip.)
```
#7 45.87 /usr/bin/mkdir -p '/usr/local/vips/lib/pkgconfig'
#7 45.88 /usr/bin/install -c -m 644 libheif.pc '/usr/local/vips/lib/pkgconfig'
#7 45.88 make[2]: Leaving directory `/tmp/libheif-1.15.1'
#7 45.88 make[1]: Leaving directory `/tmp/libheif-1.15.1'
#7 45.88 SUCCESS
#7 45.88 + echo SUCCESS
#7 DONE 46.0s
```
Great, autotools works.
Now, basically the same thing, but with cmake. It fails to link, reporting `undefined reference to `pthread_create'` error.
```Dockerfile
# syntax=docker/dockerfile:1
FROM amazonlinux:2
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN set -eux && \
echo "build: ${BUILDPLATFORM}, target: ${TARGETPLATFORM}" && \
yum makecache && \
amazon-linux-extras install -y epel && \
yum update -y && \
yum install -y \
ca-certificates \
curl tar\
git gcc gcc-c++ make \
libtool automake \
pkgconfig \
glib2-devel \
zlib-devel \
libjpeg-devel \
libjpeg-turbo-devel \
libpng-devel \
libgif-devel \
libtiff-devel \
libexif-devel \
libgsf-devel
# cmake included in amazonlinux:2 is too old. Get a fresh one.
RUN set -eux; \
arch=$(echo "${TARGETPLATFORM}" | cut -d'/' -f2); \
echo "arch: ${arch}"; \
url=; \
case "$arch" in \
'amd64') \
url='https://github.com/Kitware/CMake/releases/download/v3.26.0/cmake-3.26.0-linux-x86_64.tar.gz'; \
sha256='69b55523145b2e619f637e7766c413cb1b7de1f06269ea1eab4a655d59847d59'; \
;; \
'arm64') \
url='https://github.com/Kitware/CMake/releases/download/v3.26.0/cmake-3.26.0-linux-aarch64.tar.gz'; \
sha256='8af49df3a4a38bf971c98e92ee193998693ad8e0964a7891b6df3dfd88c7fdfd'; \
;; \
*) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \
esac; \
\
curl --fail --silent --show-error --location --output cmake.tgz "$url" ; \
echo "$sha256 cmake.tgz" | sha256sum -c -; \
\
mkdir -p /tmp/cmake ; \
tar -xzf cmake.tgz --strip-components=1 -C /tmp/cmake ; \
rm cmake.tgz; \
/tmp/cmake/bin/cmake --version
ENV PATH=$PATH:/tmp/cmake/bin
# build from source
ENV VIPSHOME /usr/local/vips
ENV PKG_CONFIG_PATH $VIPSHOME/lib/pkgconfig
ARG LIBHEIF_VERSION=1.15.1
ARG LIBHEIF_URL=https://github.com/strukturag/libheif/releases/download/v${LIBHEIF_VERSION}/libheif-${LIBHEIF_VERSION}.tar.gz
RUN set -eux && \
cd /tmp && \
curl --fail --silent --show-error --location --output libheif-${LIBHEIF_VERSION}.tar.gz "${LIBHEIF_URL}" && \
tar xzf libheif-${LIBHEIF_VERSION}.tar.gz && \
cd libheif-${LIBHEIF_VERSION} && \
cmake . -DCMAKE_INSTALL_PREFIX=${VIPSHOME} && \
make && \
make install && \
echo "SUCCESS"
```
Same, build with `docker build . --progress=plain `.
We get following error:
```
#12 9.866 [ 46%] Linking CXX shared library libheif.so
#12 10.07 [ 46%] Built target heif
#12 10.08 [ 48%] Building CXX object examples/CMakeFiles/heif-info.dir/heif_info.cc.o
#12 10.29 [ 51%] Linking CXX executable heif-info
#12 10.33 ../libheif/libheif.so.1.15.1: undefined reference to `pthread_create'
#12 10.33 collect2: error: ld returned 1 exit status
#12 10.33 make[2]: *** [examples/heif-info] Error 1
#12 10.33 make[1]: *** [examples/CMakeFiles/heif-info.dir/all] Error 2
#12 10.33 make: *** [all] Error 2
#12 ERROR: executor failed running (...)
```
The only material difference in the build commands (apart from installing cmake) is this:
```diff
38,39c68
< ./autogen.sh && \
< ./configure --disable-go --prefix=${VIPSHOME} && \
---
> cmake . -DCMAKE_INSTALL_PREFIX=${VIPSHOME} && \
```
It seems this fails on the `heif-info` build and I did not find any tips in readme how to ask cmake to skip that step.
Also, I had to disable the `go` compilation step because go build will fail with a recent go version such as 1.20 - complaining that go.mod is required. | Error building examples/heif-info with cmake on amazonlinux:2 - "undefined reference to `pthread_create'" | https://api.github.com/repos/strukturag/libheif/issues/796/comments | 3 | 2023-03-18T09:16:05Z | 2023-04-03T07:06:25Z | https://github.com/strukturag/libheif/issues/796 | 1,630,243,212 | 796 |
[
"strukturag",
"libheif"
]
| **Tested version:**
libheif-1.15.1
**Description of the bug:**
Floating point exception is triggered when processing a crafted heif image, caused by divide by zero error, which leads to a crash.
This can be used for denial of service attacks.
**Steps to reproduce the bug:**
Compile with Address Sanitizer (ASan) :
./fuzzer ./poc.heif
**Address Sanitizer log:**
```
min@skensita:~/heif/fuzzer$ ./fuzzer dbg/classifiedCrashes/7e74fe547c83f1da6453572ddfe6832d1da6109c
AddressSanitizer:DEADLYSIGNAL
=================================================================
==8030==ERROR: AddressSanitizer: FPE on unknown address 0x55722e2d29ed (pc 0x55722e2d29ed bp 0x7ffebc2cd170 sp 0x7ffebc2cd160 T0)
#0 0x55722e2d29ec in heif::Fraction::round() const (/home/min/heif/fuzzer/fuzzer+0x1189ec)
#1 0x55722e2f32da in heif::Box_clap::bottom_rounded(int) const (/home/min/heif/fuzzer/fuzzer+0x1392da)
#2 0x55722e22568c in heif::HeifContext::decode_image_planar(unsigned int, std::shared_ptr<heif::HeifPixelImage>&, heif_colorspace, heif_decoding_options const*, bool) const (/home/min/heif/fuzzer/fuzzer+0x6b68c)
#3 0x55722e222609 in heif::HeifContext::decode_image_user(unsigned int, std::shared_ptr<heif::HeifPixelImage>&, heif_colorspace, heif_chroma, heif_decoding_options const*) const (/home/min/heif/fuzzer/fuzzer+0x68609)
#4 0x55722e1dd8dc in heif_decode_image (/home/min/heif/fuzzer/fuzzer+0x238dc)
#5 0x55722e1d46fa in TestDecodeImage(heif_context*, heif_image_handle const*) (/home/min/heif/fuzzer/fuzzer+0x1a6fa)
#6 0x55722e1d4c4c in main (/home/min/heif/fuzzer/fuzzer+0x1ac4c)
#7 0x7fed2bb83082 in __libc_start_main ../csu/libc-start.c:308
#8 0x55722e1d42bd in _start (/home/min/heif/fuzzer/fuzzer+0x1a2bd)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE (/home/min/heif/fuzzer/fuzzer+0x1189ec) in heif::Fraction::round() const
==8030==ABORTING
```
Please check the attached POC.
[POC.zip](https://github.com/strukturag/libheif/files/10894604/POC.zip) | FPE in box.cc - heif::Fraction::round() | https://api.github.com/repos/strukturag/libheif/issues/794/comments | 5 | 2023-03-06T05:00:41Z | 2023-05-05T20:19:59Z | https://github.com/strukturag/libheif/issues/794 | 1,610,666,973 | 794 |
[
"strukturag",
"libheif"
]
| The emscripten build now builds Asmjs which is not a recommended target anymore. It would be great if Webassembly were provided instead.
Related to https://github.com/strukturag/libheif/pull/474
| Webassembly | https://api.github.com/repos/strukturag/libheif/issues/792/comments | 0 | 2023-03-03T18:20:50Z | 2023-03-03T18:20:50Z | https://github.com/strukturag/libheif/issues/792 | 1,609,072,912 | 792 |
[
"strukturag",
"libheif"
]
| libheif+dav1d decode sample.avif error | libheif+dav1d decode sample.avif error | https://api.github.com/repos/strukturag/libheif/issues/791/comments | 1 | 2023-02-24T14:33:41Z | 2023-02-25T03:32:47Z | https://github.com/strukturag/libheif/issues/791 | 1,598,744,109 | 791 |
[
"strukturag",
"libheif"
]
| When converting large resolution images to avif, heif-enc exits successfully. But the generated avif file cannot be opened.
Test image -- https://commons.wikimedia.org/wiki/File:LARGE_elevation.jpg 10800x5400
```
-> heif-enc -A LARGE_elevation.jpg -o t.avif
-> echo $?
0
-> identify -verbose t.avif
Error parsing OBU data
identify: Decoder plugin generated an error: Unspecified (7.0) `t.avif' @ error/heic.c/IsHEIFSuccess/139.
```
It looks like the issue appears after upgrading libheif from **1.14.2-5.1 to 1.14.2-8.3**.
| heif_enc generate corrupted avif files when the resolution of input image is large | https://api.github.com/repos/strukturag/libheif/issues/790/comments | 20 | 2023-02-24T11:57:23Z | 2023-07-14T21:16:24Z | https://github.com/strukturag/libheif/issues/790 | 1,598,500,094 | 790 |
[
"strukturag",
"libheif"
]
| Hi,
I've been happy to see there is an official Go package now. However, I find the licensing a bit confusing because https://github.com/strukturag/libheif/blob/master/go/heif/heif.go contains the GPL header, even though libheif is distributed under LGPL, from what I can deduce from https://github.com/strukturag/libheif/issues/778. I also saw in other issues that sometimes there were just copy-paste errors for the licensing, that were fixed.
Was it intentional to put the GPL header in heif.go? Is it actually LGPL?
Thanks!
-Matt | License for the Go bindings? | https://api.github.com/repos/strukturag/libheif/issues/789/comments | 2 | 2023-02-23T21:01:40Z | 2023-04-24T19:13:03Z | https://github.com/strukturag/libheif/issues/789 | 1,597,522,747 | 789 |
[
"strukturag",
"libheif"
]
| Sorry for little information, still looking for what the problem is.
Picture modes: Monochrome, Monochrome with Alpha, RGB and RGBA, 10 bit, regardless of image size.
For the same 8/12-bit images, everything is ok.
Error: "The encoder plugin generated an error: not specified: Failed to encode frame"
The same tests for version 1.14.2 pass normally.
I'll post more info when I find what the problem is. | 1.15.1 failed to encode 10-bit AVIF(1.14.2 is ok) | https://api.github.com/repos/strukturag/libheif/issues/788/comments | 26 | 2023-02-21T12:34:16Z | 2023-03-30T18:46:18Z | https://github.com/strukturag/libheif/issues/788 | 1,593,403,648 | 788 |
[
"strukturag",
"libheif"
]
| libheif = 1.15.1
gcc = 13.0.1
o/s = fedora-38-x86_64
```
make[2]: Entering directory '/builddir/build/BUILD/libheif-1.15.1/libheif'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -I/usr/include/libvmaf -DHWY_SHARED_DEFINE -I/usr/include/rav1e -I/usr/include/svt-av1 -DEB_DLL -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -c -o libheif_la-heif_colorconversion.lo `test -f 'heif_colorconversion.cc' || echo './'`heif_colorconversion.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -I/usr/include/libvmaf -DHWY_SHARED_DEFINE -I/usr/include/rav1e -I/usr/include/svt-av1 -DEB_DLL -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -c heif_colorconversion.cc -fPIC -DPIC -o .libs/libheif_la-heif_colorconversion.o
heif_colorconversion.cc: In member function 'Op_mono_to_RGB24_32::convert_colorspace(std::shared_ptr<heif::HeifPixelImage const> const&, heif::ColorState const&, heif::ColorConversionOptions const&)':
heif_colorconversion.cc:1902:71: error: 'in_a' may be used uninitialized [-Werror=maybe-uninitialized]
1902 | out_p[y * out_p_stride + 4 * x + 3] = in_a[x + y * in_a_stride];
| ^
heif_colorconversion.cc:1873:26: note: 'in_a' was declared here
1873 | const uint8_t* in_y, * in_a;
| ^~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1395: libheif_la-heif_colorconversion.lo] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/libheif-1.15.1/libheif'
make[2]: *** Waiting for unfinished jobs....
``` | libheif fails to compile with gcc-13 | https://api.github.com/repos/strukturag/libheif/issues/787/comments | 1 | 2023-02-18T10:24:19Z | 2023-02-18T11:46:18Z | https://github.com/strukturag/libheif/issues/787 | 1,590,292,577 | 787 |
[
"strukturag",
"libheif"
]
| Hello,
I observed that when I disable `ENABLE_PLUGIN_LOADING` and keep `BUILD_SHARED_LIBS` enabled, I get the linking error.
Steps to reproduce on my system:
```
git clone --depth 1 -b v1.15.0 https://github.com/strukturag/libheif.git
cd libheif
mkdir build
cd build
cmake -DENABLE_PLUGIN_LOADING=OFF ..
make
```
```
[ 2%] Building CXX object libheif/CMakeFiles/heif.dir/bitstream.cc.o
[ 4%] Building CXX object libheif/CMakeFiles/heif.dir/box.cc.o
[ 6%] Building CXX object libheif/CMakeFiles/heif.dir/error.cc.o
[ 8%] Building CXX object libheif/CMakeFiles/heif.dir/heif.cc.o
[ 10%] Building CXX object libheif/CMakeFiles/heif.dir/heif_context.cc.o
[ 12%] Building CXX object libheif/CMakeFiles/heif.dir/heif_file.cc.o
[ 14%] Building CXX object libheif/CMakeFiles/heif.dir/heif_image.cc.o
[ 16%] Building CXX object libheif/CMakeFiles/heif.dir/heif_hevc.cc.o
[ 18%] Building CXX object libheif/CMakeFiles/heif.dir/heif_avif.cc.o
[ 20%] Building CXX object libheif/CMakeFiles/heif.dir/heif_colorconversion.cc.o
[ 22%] Building CXX object libheif/CMakeFiles/heif.dir/heif_plugin_registry.cc.o
[ 25%] Building CXX object libheif/CMakeFiles/heif.dir/heif_plugin.cc.o
[ 27%] Building CXX object libheif/CMakeFiles/heif.dir/nclx.cc.o
[ 29%] Building CXX object libheif/CMakeFiles/heif.dir/heif_init.cc.o
[ 31%] Building CXX object libheif/CMakeFiles/heif.dir/metadata_compression.cc.o
[ 33%] Building CXX object libheif/CMakeFiles/heif.dir/common_utils.cc.o
[ 35%] Building CXX object libheif/CMakeFiles/heif.dir/plugins_unix.cc.o
[ 37%] Building CXX object libheif/CMakeFiles/heif.dir/plugins/heif_encoder_x265.cc.o
[ 39%] Building CXX object libheif/CMakeFiles/heif.dir/plugins/heif_decoder_libde265.cc.o
[ 41%] Building CXX object libheif/CMakeFiles/heif.dir/plugins/heif_decoder_dav1d.cc.o
[ 43%] Building CXX object libheif/CMakeFiles/heif.dir/plugins/heif_decoder_aom.cc.o
[ 45%] Building CXX object libheif/CMakeFiles/heif.dir/plugins/heif_encoder_aom.cc.o
[ 47%] Building CXX object libheif/CMakeFiles/heif.dir/plugins/heif_encoder_svt.cc.o
[ 50%] Building CXX object libheif/CMakeFiles/heif.dir/plugins/heif_encoder_rav1e.cc.o
[ 52%] Linking CXX shared library libheif.so
[ 52%] Built target heif
[ 54%] Building CXX object examples/CMakeFiles/heif-info.dir/heif_info.cc.o
[ 56%] Linking CXX executable heif-info
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: ../libheif/libheif.so.1.15.0: undefined reference to `error_dlopen'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/CMakeFiles/heif-info.dir/build.make:98: examples/heif-info] Error 1
make[1]: *** [CMakeFiles/Makefile2:177: examples/CMakeFiles/heif-info.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
``` | libheif.so.1.15.0: undefined reference to `error_dlopen' | https://api.github.com/repos/strukturag/libheif/issues/785/comments | 1 | 2023-02-16T18:01:51Z | 2023-02-16T18:10:22Z | https://github.com/strukturag/libheif/issues/785 | 1,588,136,129 | 785 |
[
"strukturag",
"libheif"
]
| A user just uploaded to my site a file called "poc.heic" that causes libheif to crash.
The HEIC file structure is valid. The error is coming from somewhere deeper.
The HEIC file contains 4 images. Primary, thumb1, and thumb2 will crash. Thumb3 renders as really corrupted.
I have temporarily placed the file at https://hackerfactor.com/private/poc-heic.zip. The zip contains poc.heic.
| poc of HEIC crash | https://api.github.com/repos/strukturag/libheif/issues/784/comments | 19 | 2023-02-15T14:42:33Z | 2023-05-08T12:21:20Z | https://github.com/strukturag/libheif/issues/784 | 1,585,980,892 | 784 |
[
"strukturag",
"libheif"
]
| CMake
```ruby
FetchContent_Declare(libheif
GIT_REPOSITORY https://github.com/strukturag/libheif.git
GIT_TAG 67739b6c2d060ba276dcffc9b3975c7eb4aca416 # master
)
FetchContent_MakeAvailable(libheif)
```
Error log:
```
/cygdrive/d/Documents/Library/C/libheif_test/cmake-build-debug/_deps/libheif-src/libheif/plugins_unix.cc: In function 'std::vector<std::basic_string<char> > list_all_potential_plugins_in_directory_unix(const char*)':
/cygdrive/d/Documents/Library/C/libheif_test/cmake-build-debug/_deps/libheif-src/libheif/plugins_unix.cc:67:23: error: 'DT_REG' was not declared in this scope
67 | if ((d->d_type == DT_REG || d->d_type == DT_LNK) && strlen(d->d_name) > 3 &&
| ^~~~~~
/cygdrive/d/Documents/Library/C/libheif_test/cmake-build-debug/_deps/libheif-src/libheif/plugins_unix.cc:67:46: error: 'DT_LNK' was not declared in this scope
67 | if ((d->d_type == DT_REG || d->d_type == DT_LNK) && strlen(d->d_name) > 3 &&
| ^~~~~~
make[3]: *** [_deps/libheif-build/libheif/CMakeFiles/heif.dir/build.make:280: _deps/libheif-build/libheif/CMakeFiles/heif.dir/plugins_unix.cc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:322: _deps/libheif-build/libheif/CMakeFiles/heif.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:199: CMakeFiles/libheif_test.dir/rule] Error 2
make: *** [Makefile:189: libheif_test] Error 2
``` | 'DT_REG' and 'DT_LNK' was not declared | https://api.github.com/repos/strukturag/libheif/issues/782/comments | 6 | 2023-02-14T06:15:09Z | 2023-02-14T18:18:10Z | https://github.com/strukturag/libheif/issues/782 | 1,583,561,625 | 782 |
[
"strukturag",
"libheif"
]
| Hello,
My program is triggering assertion on this fuzzer file:
[Assertion.zip](https://github.com/strukturag/libheif/files/10686623/Assertion.zip)
`/root/libheif/libheif/heif_image.cc:141: bool heif::HeifPixelImage::ImagePlane::alloc(int, int, int, heif_chroma): Assertion 'bit_depth >= 1' failed.`
Attempt to decode via `heif-convert` to PNG did not trigger the assertion.
```
#5 0x00007ffff43d7d18 in heif::HeifPixelImage::ImagePlane::alloc (this=this@entry=0x7fffffffd080, width=width@entry=101, height=height@entry=1, bit_depth=bit_depth@entry=0,
chroma=heif_chroma_444) at /root/libheif/libheif/heif_image.cc:141
#6 0x00007ffff43d86d1 in heif::HeifPixelImage::add_plane (this=0x555555594d70, channel=channel@entry=heif_channel_R, width=width@entry=101, height=height@entry=1,
bit_depth=bit_depth@entry=0) at /root/libheif/libheif/heif_image.cc:127
#7 0x00007ffff43cafc9 in heif::HeifContext::decode_full_grid_image (this=this@entry=0x55555557a0b0, ID=2,
img=std::shared_ptr<heif::HeifPixelImage> (use count 1, weak count 1) = {...}, grid_data=std::vector of length 188, capacity 188 = {...})
at /root/libheif/libheif/heif_context.cc:1576
#8 0x00007ffff43c91b8 in heif::HeifContext::decode_image_planar (this=0x55555557a0b0, ID=<optimized out>,
img=std::shared_ptr<heif::HeifPixelImage> (use count 1, weak count 1) = {...}, out_colorspace=out_colorspace@entry=heif_colorspace_RGB,
options=options@entry=0x555555594b50, alphaImage=false) at /root/libheif/libheif/heif_context.cc:1256
#9 0x00007ffff43ca215 in heif::HeifContext::decode_image_user (this=<optimized out>, ID=<optimized out>,
img=std::shared_ptr<heif::HeifPixelImage> (use count 1, weak count 1) = {...}, out_colorspace=heif_colorspace_RGB, out_chroma=heif_chroma_interleaved_RRGGBB_LE,
options=0x555555594b50) at /root/libheif/libheif/heif_context.cc:1096
#10 0x00007ffff43bf919 in heif_decode_image (in_handle=0x555555581760, out_img=0x7fffffffd730, colorspace=<optimized out>, chroma=<optimized out>, options=<optimized out>)
at /root/libheif/libheif/heif.cc:958
``` | Assertion `bit_depth >= 1' failed. | https://api.github.com/repos/strukturag/libheif/issues/781/comments | 3 | 2023-02-08T14:56:00Z | 2023-02-09T09:52:20Z | https://github.com/strukturag/libheif/issues/781 | 1,576,267,584 | 781 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.