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" ]
Newest libheif build (today, about 6 hours ago, will rebuild and update this thread) with imagemagicks convert command (downloaded and built from https://www.imagemagick.org/download/ImageMagick.tar.gz and built with `--with-heic=yes`) Im getting a "convert: Invalid input: No 'meta' box `index.heic' @ error/heic.c/IsHeifSuccess/136" for the image available [here (dynamicwallpaperclub)](https://dynamicwallpaper.club/wallpaper/qvvk60oi7v). If anyone finds a fix/if anything is wrong with the image itself, that would be cool
error: `Invalid input: No 'meta' box`
https://api.github.com/repos/strukturag/libheif/issues/163/comments
3
2019-10-11T14:10:29Z
2019-10-11T20:19:00Z
https://github.com/strukturag/libheif/issues/163
505,876,732
163
[ "strukturag", "libheif" ]
In main library header, we can see : enum heif_compression_format { heif_compression_undefined = 0, heif_compression_HEVC = 1, heif_compression_AVC = 2, heif_compression_JPEG = 3 }; So HEIF container can contain a JPEG image. If libjpeg is available, it's planed to pass this library as an external dependency for a delegate plugin to encode and decode JPEG image data ? Best Gilles Caulier
HEIF container and JPEG image
https://api.github.com/repos/strukturag/libheif/issues/162/comments
2
2019-10-06T10:38:23Z
2019-10-14T13:29:35Z
https://github.com/strukturag/libheif/issues/162
503,082,274
162
[ "strukturag", "libheif" ]
Decoding and encoding process can take a while especially with large image. I see in API a progress handler in decoding structure: struct heif_decoding_options { uint8_t version; // version 1 options // Ignore geometric transformations like cropping, rotation, mirroring. // Default: false (do not ignore). uint8_t ignore_transformations; void (*start_progress)(enum heif_progress_step step, int max_progress, void* progress_user_data); void (*on_progress)(enum heif_progress_step step, int progress, void* progress_user_data); void (*end_progress)(enum heif_progress_step step, void* progress_user_data); void* progress_user_data; }; I check the rest of the code to see if progress_user_data or on_progress are used, and i found nothing excepted an init to NULL at structure allocation. It's planed to extend this progress handler in the future ? Best Gilles Caulier
decoding and encoding progress report from library to client application
https://api.github.com/repos/strukturag/libheif/issues/161/comments
1
2019-10-06T10:34:22Z
2019-12-17T14:08:37Z
https://github.com/strukturag/libheif/issues/161
503,081,860
161
[ "strukturag", "libheif" ]
Following spec from Nokia in "Images in HEIF Files" section, HEIF is able to store plenty of image versions. One interesting is the Cover image which can be used to render a reduced size preview on screen. Currently, libheif can get "Master" and "thumbnail" image. How i can get the "Cover" version ? Best Gilles Caulier
How to get Cover image from HEIF container.
https://api.github.com/repos/strukturag/libheif/issues/160/comments
1
2019-10-06T10:28:54Z
2019-10-07T07:30:15Z
https://github.com/strukturag/libheif/issues/160
503,081,337
160
[ "strukturag", "libheif" ]
a plugin or a wrapper so that we can open images in python pillow ``` from PIL import Image img=Image.open('file.heif') ``` for more information see https://pillow.readthedocs.io/en/latest/handbook/writing-your-own-file-decoder.html
python pillow support
https://api.github.com/repos/strukturag/libheif/issues/159/comments
2
2019-09-25T15:24:16Z
2022-05-02T23:12:11Z
https://github.com/strukturag/libheif/issues/159
498,358,927
159
[ "strukturag", "libheif" ]
In function HeifContext::decode_full_grid_image and HeifContext::decode_and_paste_tile_image does not consider when original image width or height is odd number, when odd, for YUV420, one row or col UV is missing.
decode Grid image does not consider width or height is odd number
https://api.github.com/repos/strukturag/libheif/issues/157/comments
3
2019-09-18T02:01:27Z
2019-09-23T09:56:44Z
https://github.com/strukturag/libheif/issues/157
494,943,770
157
[ "strukturag", "libheif" ]
$ ./configure --enable-examples [...] configure: Examples: no [...]
1.5.1: passing --enable-examples to configure disables examples
https://api.github.com/repos/strukturag/libheif/issues/153/comments
1
2019-09-03T14:00:25Z
2019-09-23T09:31:21Z
https://github.com/strukturag/libheif/issues/153
488,624,288
153
[ "strukturag", "libheif" ]
it would be so helpful and useful to access all the features of this library through C#. there is nothing out there similar to the features of this library, and the one close are extremely limited.
Please create a NuGet Packag for C#
https://api.github.com/repos/strukturag/libheif/issues/152/comments
6
2019-09-02T07:21:25Z
2023-06-10T11:25:33Z
https://github.com/strukturag/libheif/issues/152
488,038,378
152
[ "strukturag", "libheif" ]
Hello, thanks again for this nice thing. With this test PNG: ![tree](https://user-images.githubusercontent.com/580843/64079098-26100900-ccdb-11e9-807d-c0b422210d37.png) I see: ``` $ heif-enc tree.png -o tree.heif heif-enc: malloc.c:2392: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Aborted (core dumped) ``` With git master (as of 1 sep 2019), tag `v1.5.1` and tag `v1.5.0`. Tag `v1.4.1` seems to work fine.
assert() fails with RGBA encode in master, 1.5.1 and 1.5.0
https://api.github.com/repos/strukturag/libheif/issues/151/comments
2
2019-09-01T16:10:06Z
2019-09-02T08:18:15Z
https://github.com/strukturag/libheif/issues/151
487,902,950
151
[ "strukturag", "libheif" ]
Please increase the `MAX_IMAGE_WIDTH` and `MAX_IMAGE_HEIGHT` limits in `heif_limits.h`. I work with high-resolution scans and libheif refuses to open such images with the message `Memory allocation error: Security limit exceeded: Image size 18000x12000 exceeds the maximum image size 16384x16384`. As a result, software like GIMP and ImageMagick can save such HEIF images with no problem, but nothing can ever view them again.
Increase MAX_IMAGE_WIDTH/HEIGHT limit
https://api.github.com/repos/strukturag/libheif/issues/150/comments
4
2019-08-31T21:37:35Z
2019-09-23T09:49:54Z
https://github.com/strukturag/libheif/issues/150
487,813,767
150
[ "strukturag", "libheif" ]
Hi. Is is possible to get a correct backport of the patch for CVE-2019-11471 for version 1.4.0? I can't easily push 1.5.0 with its new lib major to a stable release distro and am not a programmer. Did try to do it, but wouldn't be sure I did it right. Thank you so much in advance. Cheers, kekePower
Backport patch for CVE-2019-11471
https://api.github.com/repos/strukturag/libheif/issues/149/comments
5
2019-08-29T22:02:58Z
2019-09-18T07:20:25Z
https://github.com/strukturag/libheif/issues/149
487,196,134
149
[ "strukturag", "libheif" ]
When decoding images in a multi-threaded environment, with Colorspace and/or Chroma set to undefined, it will segfault with `malloc: pointer being freed was not allocated` Stable reproduce "script": https://gist.github.com/duedal/fd846c0d24d0d90db60fcb1862946040 Test image; https://gist.github.com/duedal/fd846c0d24d0d90db60fcb1862946040/raw/e3d68d623d0444c573f5a83fc4fb77197ccf54d3/world-political.heic Reproduce `go run race.go -input world-political.heic` if you run with `-rgb` it will not crash `go run race.go -input world-political.heic -rgb`
segfault: heif.ColorspaceUndefined, heif.ChromaUndefined
https://api.github.com/repos/strukturag/libheif/issues/147/comments
18
2019-08-28T12:32:28Z
2019-08-29T13:52:44Z
https://github.com/strukturag/libheif/issues/147
486,353,344
147
[ "strukturag", "libheif" ]
It seems there may have been a regression between the current version of libheif in the git repo master and in the Ubuntu repositories -- I've been having trouble extracting the depth map of some images using the Ubuntu version, and yet when I compile from tip of master, there's always a failure in color conversion (something to do with the Dijkstra search in ColorConversionPipeline::construct_pipeline). This is done completely differently in the older version. I attached a sample file. [bottle-ios.zip](https://github.com/strukturag/libheif/files/3542508/bottle-ios.zip)
Some HEIC depth channels can't be extracted
https://api.github.com/repos/strukturag/libheif/issues/145/comments
1
2019-08-26T18:58:21Z
2019-08-27T09:05:31Z
https://github.com/strukturag/libheif/issues/145
485,390,599
145
[ "strukturag", "libheif" ]
JPEG format is has extension `.jpg` and `jpeg`, heif-enc support jpeg but heif-convert not. e.g. `heif-enc input.jpeg -o output.heic` is ok, but `heif-convert output.heic output.heic.jpeg` will cause `Unknown file type in output.heic.jpeg`.
heif-convert support .jpeg extension
https://api.github.com/repos/strukturag/libheif/issues/144/comments
1
2019-08-26T06:45:17Z
2019-08-26T10:44:17Z
https://github.com/strukturag/libheif/issues/144
485,072,544
144
[ "strukturag", "libheif" ]
I'm the author of [OpenImageIO](https://github.com/OpenImageIO/oiio), which uses libheif for its heic file I/O. Ever since the 1.5.0 release was picked up by Homebrew a few days ago (on both my own mac laptop as well as the MacOSX instances on our Travis-CI tests), I have been seeing intermittent failures in some of my unit tests where I make a simple image of (1,1,1,1) values, write it, then read it back again and check that the read pixels were identical to the ones I wrote. It doesn't fail every time... maybe every 10th one... so it seems a bit nondeterministic. After some investigation, it seems that the incorrectly read values are only in the alpha channel, and only the leftmost couple dozen pixels of the FIRST scanline. After that, it's always correct, and also the RGB channels always seem correct. The writing seems to work consistently. The problem is with the read -- I can read the same file and only sometimes get the failure. I have not yet tried on other platforms (my Linux CI tests are using an older version of libheif). Does this ring a bell? Please let me know what additional information I can provide to help you track it down.
Problems reading alpha since v1.5.0
https://api.github.com/repos/strukturag/libheif/issues/143/comments
9
2019-08-18T18:55:58Z
2019-08-28T00:04:07Z
https://github.com/strukturag/libheif/issues/143
482,025,665
143
[ "strukturag", "libheif" ]
``` % gcc --version :( 1 19-08-16 - 12:59:14 gcc (Mageia 9.2.0-1.mga8) 9.2.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` ``` % rpm -qa | grep pixbuf :( 130 19-08-16 - 12:58:32 lib64gdk_pixbuf2.0-devel-2.38.1-3.mga7 lib64gdk_pixbuf2.0_0-2.38.1-3.mga7 gdk-pixbuf2.0-2.38.1-3.mga7 lib64gdk_pixbuf-gir2.0-2.38.1-3.mga7 ``` ``` Making all in gdk-pixbuf make[2]: Entering directory '/mgarepo/libheif/BUILD/libheif-master/gdk-pixbuf' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -O3 -ffast-math -march=sandybridge -mtune=sandybridge -I.. -I.. -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -O3 -ffast-math -march=sandybridge -mtune=sandybridge -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -MT libpixbufloader_heif_la-pixbufloader-heif.lo -MD -MP -MF .deps/libpixbufloader_heif_la-pixbufloader-heif.Tpo -c -o libpixbufloader_heif_la-pixbufloader-heif.lo `test -f 'pixbufloader-heif.c' || echo './'`pixbufloader-heif.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -O3 -ffast-math -march=sandybridge -mtune=sandybridge -I.. -I.. -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -O3 -ffast-math -march=sandybridge -mtune=sandybridge -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -MT libpixbufloader_heif_la-pixbufloader-heif.lo -MD -MP -MF .deps/libpixbufloader_heif_la-pixbufloader-heif.Tpo -c pixbufloader-heif.c -fPIC -DPIC -o .libs/libpixbufloader_heif_la-pixbufloader-heif.o In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:38, from pixbufloader-heif.c:23: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h:111:79: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations] 111 | const GTimeVal *start_time); | ^~~~~ In file included from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:35, from pixbufloader-heif.c:23: /usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here 551 | struct _GTimeVal | ^~~~~~~~~ In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:38, from pixbufloader-heif.c:23: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h:122:79: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations] 122 | const GTimeVal *current_time); | ^~~~~ In file included from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:35, from pixbufloader-heif.c:23: /usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here 551 | struct _GTimeVal | ^~~~~~~~~ In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:38, from pixbufloader-heif.c:23: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h:167:46: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations] 167 | const GTimeVal *start_time); | ^~~~~ In file included from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:35, from pixbufloader-heif.c:23: /usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here 551 | struct _GTimeVal | ^~~~~~~~~ In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:38, from pixbufloader-heif.c:23: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h:211:41: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations] 211 | const GTimeVal *current_time); | ^~~~~ In file included from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h:35, from pixbufloader-heif.c:23: /usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here 551 | struct _GTimeVal | ^~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:496: libpixbufloader_heif_la-pixbufloader-heif.lo] Error 1 make[2]: Leaving directory '/mgarepo/libheif/BUILD/libheif-master/gdk-pixbuf' make[1]: *** [Makefile:519: all-recursive] Error 1 make: *** [Makefile:428: all] Error 2 ```
Error while compiling pixbuf
https://api.github.com/repos/strukturag/libheif/issues/141/comments
6
2019-08-16T11:00:26Z
2019-08-16T12:48:10Z
https://github.com/strukturag/libheif/issues/141
481,557,723
141
[ "strukturag", "libheif" ]
Commit https://github.com/strukturag/libheif/commit/444b24ce51b73afedd8e0d31b71867be3433d9fc fixes a memory leak caused by circular image references. While the commit fixes the error, we should probably reject such files while parsing.
Reject files with circular image references
https://api.github.com/repos/strukturag/libheif/issues/140/comments
0
2019-08-02T15:31:11Z
2019-08-02T15:31:11Z
https://github.com/strukturag/libheif/issues/140
476,237,931
140
[ "strukturag", "libheif" ]
Hi, I found a FPE bug on the latest commit fd0c01d on master. PoC: https://github.com/strongcourage/PoCs/blob/master/libheif_fd0c01d/PoC_fpe_box.cc:62 Command: examples/heif-info $PoC Valgrind says: ~~~ ==1112== Process terminating with default action of signal 8 (SIGFPE) ==1112== Integer divide by zero at address 0x80362AC81 ==1112== at 0x528354: Fraction (box.cc:62) ==1112== by 0x528354: operator- (box.cc:100) ==1112== by 0x528354: heif::Box_clap::get_height_rounded() const (box.cc:2263) ==1112== by 0x48F697: heif::HeifContext::interpret_heif_file() (heif_context.cc:696) ==1112== by 0x49A40A: heif::HeifContext::read_from_file(char const*) (heif_context.cc:351) ==1112== by 0x40859F: heif_context_read_from_file (heif.cc:184) ==1112== by 0x404290: main (heif_info.cc:145) Floating point exception ~~~ Thanks, Manh Dung
Floating point exception
https://api.github.com/repos/strukturag/libheif/issues/139/comments
5
2019-07-28T10:14:30Z
2021-07-26T15:05:00Z
https://github.com/strukturag/libheif/issues/139
473,728,085
139
[ "strukturag", "libheif" ]
Hi, I found a bug on the latest commit fd0c01d on master. PoC: https://github.com/strongcourage/PoCs/blob/master/libheif_fd0c01d/PoC_segv_box.cc:2408 Command: examples/heif-convert $PoC /tmp/out.png ASAN says: ~~~ ==16874==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000050 (pc 0x00000048143c bp 0x7ffc1ade73a0 sp 0x7ffc1ade7370 T0) #0 0x48143b in std::vector<heif::Box_iref::Reference, std::allocator<heif::Box_iref::Reference> >::begin() const /usr/include/c++/5/bits/stl_vector.h:557 #1 0x475604 in heif::Box_iref::get_references(unsigned int, unsigned int) const ../../libheif/box.cc:2408 #2 0x4293b6 in heif::HeifContext::get_id_of_non_virtual_child_image(unsigned int, unsigned int&) const ../../libheif/heif_context.cc:816 #3 0x42979a in heif::HeifContext::Image::get_luma_bits_per_pixel() const ../../libheif/heif_context.cc:839 #4 0x40c1a4 in heif_image_handle_get_luma_bits_per_pixel ../../libheif/heif.cc:455 #5 0x4060fc in main ../../examples/heif_convert.cc:209 #6 0x7f1ac522d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #7 0x404f68 in _start (/home/dungnguyen/PoCs/libheif_fd0c01d/heif-convert-asan+0x404f68) ~~~ Thanks, Manh Dung
SEGV in box.cc:2408
https://api.github.com/repos/strukturag/libheif/issues/138/comments
2
2019-07-28T00:11:00Z
2021-07-26T15:04:36Z
https://github.com/strukturag/libheif/issues/138
473,690,024
138
[ "strukturag", "libheif" ]
I am trying to use "libheif" library in my UWP app to decode some HEIC images. In the heif.h I added the fallowing **C++ code** `extern "C" __declspec(dllexport)` to the functions I want to invoke from my C# code: ``` LIBHEIF_API extern "C" __declspec(dllexport) struct heif_context* heif_context_alloc(void); LIBHEIF_API extern "C" __declspec(dllexport) void heif_context_free(struct heif_context*); LIBHEIF_API extern "C" __declspec(dllexport) struct heif_error heif_context_read_from_file(struct heif_context*, const char* filename, const struct heif_reading_options*); ... ``` Then i compiled the library into a DLL file and added it to my UWP project. In the **C# code** I did this: ``` namespace Libraries { public class PInvokeCode { [DllImport("ms-appx:///libheif.dll")] public static extern struct heif_context_alloc(); [DllImport("ms-appx:///libheif.dll")] public static extern void heif_context_free(struct heif_context); [DllImport("ms-appx:///libheif.dll")] public static extern struct heif_error heif_context_read_from_file(struct heif_context*, const char* filename, const struct heif_reading_options*); } } ``` Of course in my UWP i allowed unsafe code nad i set the DLL as content. still, however, i cant seem to get the code to work. It is my first time attempting such thing and I dont know ecactly where I am going wrong! If you need it, here are the links to [libheif.dll](https://drive.google.com/file/d/1opwSTIMljb3BCimeRnWCVZFjtV5j8Peq/view?usp=sharing) and the [heif.h](https://drive.google.com/file/d/1DJO3Z5HGeuJ69Qt_HjZzb9SDboTBpCiw/view?usp=sharing) files..
How can I Invoke this library?
https://api.github.com/repos/strukturag/libheif/issues/137/comments
0
2019-07-11T09:29:05Z
2019-07-11T09:29:38Z
https://github.com/strukturag/libheif/issues/137
466,775,353
137
[ "strukturag", "libheif" ]
Now that [Intel' SDK][1] has a nice license, would it make sense to optionally allow libmfx (and similar libraries for nvidia/AMD) as a h265 en-/decoder backend? This might allow people to use libheif without having to worry about MPEG patents as it should be covered by the hardware vendor. [1]: https://github.com/Intel-Media-SDK/MediaSDK
libmfx and friends as decoder
https://api.github.com/repos/strukturag/libheif/issues/136/comments
4
2019-07-04T15:24:54Z
2019-10-24T21:35:27Z
https://github.com/strukturag/libheif/issues/136
464,319,725
136
[ "strukturag", "libheif" ]
Hi! I realize that libheif has support for 16-bit HEIF files since 1.4.0 so I wanted to add the support in the HEIF plug-in in GIMP (which you initially wrote). Unfortunately the plug-in crashes when I actually try to export a 16-bit image. I built the last `master` code of libheif, and the crash happens when I call `heif_context_encode_image()`. Note that the call does not return with an error, but it does a segfault, which means that even if I do something wrong, I think there is also something wrong on libheif side (which should return with an error), no? Anyway here is the backtrace: ``` Thread 1 (Thread 0x7fc6e86f2680 (LWP 25570)): #0 0x00007fc6e99f4e34 in read () at /lib64/libpthread.so.0 #1 0x00007fc6eb1141d1 in gimp_stack_trace_print (prog_name=prog_name@entry=0x7ffd3af6cd5d "/home/jehan/.local/share/crossroad/roads/native/gimp/lib/gimp/2.99/plug-ins/file-heif/file-heif", stream=0x7fc6e99de780 <_IO_2_1_stdout_>, trace=trace@entry=0x0) at /home/jehan/dev/src//gimp/libgimpbase/gimputils.c:1300 status = 1041536162 stack_printed = 0 gtrace = 0x0 gimp_pid = "25570\000\000\000\242\224\024>\340\324T>" buffer = "\000\374\017\353\306\177\000\000@v\022\353\306\177\000\000\260\255\366:\375\177\000\000]\315\366:\375\177\000\000\360\235\021\353\306\177\000\000\220\266\366:\375\177\000\000@{\216\001\000\000\000\000D\245&\353\306\177\000\000\005", '\000' <repeats 15 times>, "P{\216\001\000\000\000\000X\001\020\353\306\177\000\000\220\255\366:\375\177\000\000\236\022'\353\306\177\000\000S\000\000\000\000\000\000\000\210\"\255\373", '\000' <repeats 12 times>, "\200\347\235\351\306\177\000\000]\315\366:\375\177\000\000\022\365a\001\000\000\000\000\340\370\235\351\306\177\000\000\236\022'\353\306\177\000\000\000\000\000\000\000\000\000\000AX\205\351\306\177\000\000\000\000\000\000\000\000\000\000"... read_n = <optimized out> sync_fd = {11, 12} out_fd = {13, 14} fork_pid = 25580 pid = 25570 eintr_count = 0 tid = 25570 #2 0x00007fc6eb114630 in gimp_stack_trace_query (prog_name=0x7ffd3af6cd5d "/home/jehan/.local/share/crossroad/roads/native/gimp/lib/gimp/2.99/plug-ins/file-heif/file-heif") at /home/jehan/dev/src//gimp/libgimpbase/gimputils.c:1470 buf = "s\n\000\000\000\000\000\000\v\000\000\000\000\000\000" #3 0x00007fc6eb2056df in gimp_plugin_sigfatal_handler (sig_num=<optimized out>) at /home/jehan/dev/src//gimp/libgimp/gimp.c:1961 sigset = {__val = {0 <repeats 16 times>}} #4 0x00007fc6e99f6070 in <signal handler called> () at /lib64/libpthread.so.0 #5 0x00007fc6e9f946e0 in std::_Rb_tree<heif_channel, std::pair<heif_channel const, heif::HeifPixelImage::ImagePlane>, std::_Select1st<std::pair<heif_channel const, heif::HeifPixelImage::ImagePlane> >, std::less<heif_channel>, std::allocator<std::pair<heif_channel const, heif::HeifPixelImage::ImagePlane> > >::find(heif_channel const&) const (__k=<synthetic pointer>: <optimized out>, this=0x58) at /usr/include/c++/8/bits/stl_tree.h:2549 iter = <optimized out> #6 0x00007fc6e9f946e0 in std::map<heif_channel, heif::HeifPixelImage::ImagePlane, std::less<heif_channel>, std::allocator<std::pair<heif_channel const, heif::HeifPixelImage::ImagePlane> > >::find(heif_channel const&) const (__x=<synthetic pointer>: <optimized out>, this=0x58) at /usr/include/c++/8/bits/stl_map.h:1194 iter = <optimized out> #7 0x00007fc6e9f946e0 in heif::HeifPixelImage::get_width(heif_channel) const (this=0x0, channel=channel@entry=heif_channel_Y) at /home/jehan/dev/src/libheif/libheif/heif_image.cc:134 iter = <optimized out> #8 0x00007fc6e9fa9311 in heif::HeifContext::Image::encode_image_as_hevc(std::shared_ptr<heif::HeifPixelImage>, heif_encoder*, heif_encoding_options const*, heif_image_input_class) (this=0x1a7ed00, image=std::shared_ptr<heif::HeifPixelImage> (empty) = {...}, encoder=0x1643bf0, options=0x7ffd3af6b76e, input_class=heif_image_input_class_normal) at /home/jehan/dev/src/libheif/libheif/heif_context.cc:1666 colorspace = heif_colorspace_YCbCr chroma = heif_chroma_420 color_profile = std::shared_ptr<const heif::color_profile> (use count 2, weak count 0) = {get() = <optimized out>} c_api_image = {image = std::shared_ptr<heif::HeifPixelImage> (expired, weak count 0) = {get() = 0x7ffd3af6b650}} err = <optimized out> #9 0x00007fc6e9fa9d1f in heif::HeifContext::encode_image(std::shared_ptr<heif::HeifPixelImage>, heif_encoder*, heif_encoding_options const*, heif_image_input_class, std::shared_ptr<heif::HeifContext::Image>&) (this=<optimized out>, pixel_image=std::shared_ptr<heif::HeifPixelImage> (use count 2, weak count 1) = {...}, encoder=0x1643bf0, options=options@entry=0x7ffd3af6b76e, input_class=input_class@entry=heif_image_input_class_normal, out_image=std::shared_ptr<heif::HeifContext::Image> (use count 2, weak count 0) = {...}) at /usr/include/c++/8/ext/atomicity.h:96 image_id = <optimized out> error = {error_code = heif_error_Ok, sub_error_code = heif_suberror_Unspecified, message = "", static Ok = {error_code = heif_error_Ok, sub_error_code = heif_suberror_Unspecified, message = "", static Ok = <same as static member of an already seen type>, static kSuccess = 0x7fc6e9fb74e8 <heif::Error::kSuccess> "Success"}, static kSuccess = <same as static member of an already seen type>} #10 0x00007fc6e9fa3d8b in heif_context_encode_image(heif_context*, heif_image const*, heif_encoder*, heif_encoding_options const*, heif_image_handle**) (ctx=ctx@entry=0x1a86050, input_image=<optimized out>, encoder=<optimized out>, options=0x7ffd3af6b76e, options@entry=0x0, out_image_handle=out_image_handle@entry=0x7ffd3af6b898) at /usr/include/c++/8/ext/atomicity.h:96 default_options = {version = 1 '\001', save_alpha_channel = 1 '\001'} image = std::shared_ptr<heif::HeifContext::Image> (use count 2, weak count 0) = {get() = 0x1a7ed00} error = {error_code = heif_error_Ok, sub_error_code = heif_suberror_Unspecified, message = "", static Ok = {error_code = heif_error_Ok, sub_error_code = heif_suberror_Unspecified, message = "", static Ok = <same as static member of an already seen type>, static kSuccess = 0x7fc6e9fb74e8 <heif::Error::kSuccess> "Success"}, static kSuccess = <same as static member of an already seen type>} #11 0x0000000000406098 in save_image (error=0x7ffd3af6b880, params=0x7ffd3af6b8a4, drawable_ID=<optimized out>, image_ID=<optimized out>, file=0x18597a0) at /home/jehan/dev/src//gimp/plug-ins/common/file-heif.c:824 handle = 0x0 err = {code = <optimized out>, subcode = <optimized out>, message = 0x7ffd3af6b890 "\360;d\001"} buffer = 0x1a85040 bit_depth = <optimized out> has_alpha = <optimized out> output = <optimized out> space = 0x7fc6ea27a7c0 <space_db> stride = 12016 width = 2001 image = 0x1a86070 context = 0x1a86050 format_enc = 0x17641f0 "@*\207\001" data = 0x7fc6d0bd5010 "%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%55\312\312%%"... chroma = <optimized out> out_linear = <optimized out> encoder = 0x1643bf0 writer = {writer_api_version = 989247792, write = 0x7fc6eb11175a <_gp_proc_run_read+74>} format = <optimized out> height = 1984 __func__ = "save_image" file = 0x18597a0 export = <optimized out> params = {quality = 50, lossless = 0, save_profile = 1} image_ID = 1 drawable_ID = 2 metadata = 0x0 metadata_flags = GIMP_METADATA_SAVE_ALL values = {{type = GIMP_PDB_STATUS, data = {d_int32 = 0, d_int16 = 0, d_int8 = 0 '\000', d_float = 0, d_string = 0x0, d_int32array = 0x0, d_int16array = 0x0, d_int8array = 0x0, d_floatarray = 0x0, d_stringarray = 0x0, d_colorarray = 0x0, d_color = {r = 0, g = 0, b = 0, a = 0}, d_display = 0, d_image = 0, d_item = 0, d_layer = 0, d_layer_mask = 0, d_channel = 0, d_drawable = 0, d_selection = 0, d_boundary = 0, d_vectors = 0, d_unit = 0, d_parasite = {name = 0x0, flags = 0, size = 0, data = 0x0}, d_tattoo = 0, d_status = GIMP_PDB_EXECUTION_ERROR}}, {type = GIMP_PDB_INT32, data = {d_int32 = 0, d_int16 = 0, d_int8 = 0 '\000', d_float = 0, d_string = 0x0, d_int32array = 0x0, d_int16array = 0x0, d_int8array = 0x0, d_floatarray = 0x0, d_stringarray = 0x0, d_colorarray = 0x0, d_color = {r = 0, g = 0, b = 0, a = 0}, d_display = 0, d_image = 0, d_item = 0, d_layer = 0, d_layer_mask = 0, d_channel = 0, d_drawable = 0, d_selection = 0, d_boundary = 0, d_vectors = 0, d_unit = 0, d_parasite = {name = 0x0, flags = 0, size = 0, data = 0x0}, d_tattoo = 0, d_status = GIMP_PDB_EXECUTION_ERROR}}} run_mode = <optimized out> status = GIMP_PDB_SUCCESS error = 0x0 #12 0x0000000000406098 in run (name=<optimized out>, n_params=<optimized out>, param=<optimized out>, nreturn_vals=0x7ffd3af6b914, return_vals=<optimized out>) at /home/jehan/dev/src//gimp/plug-ins/common/file-heif.c:286 file = 0x18597a0 export = <optimized out> params = {quality = 50, lossless = 0, save_profile = 1} image_ID = 1 drawable_ID = 2 metadata = 0x0 metadata_flags = GIMP_METADATA_SAVE_ALL values = {{type = GIMP_PDB_STATUS, data = {d_int32 = 0, d_int16 = 0, d_int8 = 0 '\000', d_float = 0, d_string = 0x0, d_int32array = 0x0, d_int16array = 0x0, d_int8array = 0x0, d_floatarray = 0x0, d_stringarray = 0x0, d_colorarray = 0x0, d_color = {r = 0, g = 0, b = 0, a = 0}, d_display = 0, d_image = 0, d_item = 0, d_layer = 0, d_layer_mask = 0, d_channel = 0, d_drawable = 0, d_selection = 0, d_boundary = 0, d_vectors = 0, d_unit = 0, d_parasite = {name = 0x0, flags = 0, size = 0, data = 0x0}, d_tattoo = 0, d_status = GIMP_PDB_EXECUTION_ERROR}}, {type = GIMP_PDB_INT32, data = {d_int32 = 0, d_int16 = 0, d_int8 = 0 '\000', d_float = 0, d_string = 0x0, d_int32array = 0x0, d_int16array = 0x0, d_int8array = 0x0, d_floatarray = 0x0, d_stringarray = 0x0, d_colorarray = 0x0, d_color = {r = 0, g = 0, b = 0, a = 0}, d_display = 0, d_image = 0, d_item = 0, d_layer = 0, d_layer_mask = 0, d_channel = 0, d_drawable = 0, d_selection = 0, d_boundary = 0, d_vectors = 0, d_unit = 0, d_parasite = {name = 0x0, flags = 0, size = 0, data = 0x0}, d_tattoo = 0, d_status = GIMP_PDB_EXECUTION_ERROR}}} run_mode = <optimized out> status = GIMP_PDB_SUCCESS error = 0x0 #13 0x00007fc6eb20613f in gimp_proc_run (proc_run=0x1653b00) at /home/jehan/dev/src//gimp/libgimp/gimp.c:2277 proc_return = {name = 0x7fc6eb21e2e5 "LibGimp", nparams = 3944866547, params = 0x7fc6eb21e2ff} return_vals = 0x409600 <values> n_return_vals = 1 msg = {type = 5, data = 0x1653b00} basename = <optimized out> env_string = <optimized out> debug_string = <optimized out> protocol_version = <optimized out> __func__ = "gimp_main" #14 0x00007fc6eb20613f in gimp_loop () at /home/jehan/dev/src//gimp/libgimp/gimp.c:2111 msg = {type = 5, data = 0x1653b00} basename = <optimized out> env_string = <optimized out> debug_string = <optimized out> protocol_version = <optimized out> __func__ = "gimp_main" #15 0x00007fc6eb20613f in gimp_main (info=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /home/jehan/dev/src//gimp/libgimp/gimp.c:692 basename = <optimized out> env_string = <optimized out> debug_string = <optimized out> protocol_version = <optimized out> __func__ = "gimp_main" #16 0x00007fc6e9841413 in __libc_start_main () at /lib64/libc.so.6 #17 0x0000000000404b5e in _start () at /home/jehan/dev/src//gimp/plug-ins/common/file-heif.c:76 [Inferior 1 (process 25570) detached] /home/jehan/.local/share/crossroad/roads/native/gimp/lib/gimp/2.99/plug-ins/file-heif/file-heif (pid:25570): [E]xit, show [S]tack trace or [P]roceed: e plug-in 'file-heif' aborted before sending its procedure return values ``` And the calling code can be found here: https://gitlab.gnome.org/GNOME/gimp/blob/20124d8e030508f2450562a3f9d52e35f7020513/plug-ins/common/file-heif.c Basically I am just creating an image with: ``` chroma = has_alpha ? heif_chroma_interleaved_RRGGBBAA_BE : heif_chroma_interleaved_RRGGBB_BE; err = heif_image_create (width, height, heif_colorspace_RGB, chroma, &image); ``` Then I add a plane: ``` bit_depth = 16 heif_image_add_plane (image, heif_channel_interleaved, width, height, bit_depth * (has_alpha ? 4 : 3)); data = heif_image_get_plane (image, heif_channel_interleaved, &stride); ``` And I fill the data. Finally I go for encoding: ``` err = heif_context_get_encoder_for_format (context, heif_compression_HEVC, &encoder); err = heif_context_encode_image (context, image, encoder, NULL, &handle); ``` -> That's where it crashes with the above backtrace.
Crash when creating 16-bit HEIF image
https://api.github.com/repos/strukturag/libheif/issues/135/comments
26
2019-07-02T11:45:10Z
2019-11-18T13:09:30Z
https://github.com/strukturag/libheif/issues/135
463,181,864
135
[ "strukturag", "libheif" ]
Hi, on Debian 9, with every necessary tools & libs installed, here's the ouput of ./autogen.sh : ``` Installing pre-commit hook ... autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing gdk-pixbuf/Makefile.am:3: error: Libtool library used but 'LIBTOOL' is undefined gdk-pixbuf/Makefile.am:3: The usual way to define 'LIBTOOL' is to add 'LT_INIT' gdk-pixbuf/Makefile.am:3: to 'configure.ac' and run 'aclocal' and 'autoconf' again. gdk-pixbuf/Makefile.am:3: If 'LT_INIT' is in 'configure.ac', make sure gdk-pixbuf/Makefile.am:3: its definition is in aclocal's search path. libheif/Makefile.am:97: error: library used but 'RANLIB' is undefined libheif/Makefile.am:97: The usual way to define 'RANLIB' is to add 'AC_PROG_RANLIB' libheif/Makefile.am:97: to 'configure.ac' and run 'autoconf' again. libheif/Makefile.am:4: error: Libtool library used but 'LIBTOOL' is undefined libheif/Makefile.am:4: The usual way to define 'LIBTOOL' is to add 'LT_INIT' libheif/Makefile.am:4: to 'configure.ac' and run 'aclocal' and 'autoconf' again. libheif/Makefile.am:4: If 'LT_INIT' is in 'configure.ac', make sure libheif/Makefile.am:4: its definition is in aclocal's search path. autoreconf: automake failed with exit status: 1 ``` I tried using cmake and it works, but it didn't installed libheif, only the lib related to gdk-pixbuf, in which I'm not interested. I'd be glad if someone could provide some guidance & advice. Thanks.
Problem compiling libheif
https://api.github.com/repos/strukturag/libheif/issues/134/comments
4
2019-06-27T10:26:21Z
2019-10-14T13:31:22Z
https://github.com/strukturag/libheif/issues/134
461,448,385
134
[ "strukturag", "libheif" ]
use `heif_decode_image` to decode a 1.7M image. It take 6 seconds on iPhone 7P. It too slow to decode. Can I make it fast ?
too slow with 1M image
https://api.github.com/repos/strukturag/libheif/issues/133/comments
0
2019-06-05T05:59:30Z
2019-06-05T05:59:30Z
https://github.com/strukturag/libheif/issues/133
452,327,161
133
[ "strukturag", "libheif" ]
I'm trying to get a depth channel from .heic file taken by recent iPhone. When I try converting it by `heif-convert`, the following error happened. It seems something is wrong when the program tries to process the depth channel (because the RGB image is written [here](https://github.com/strukturag/libheif/blob/master/examples/heif_convert.cc#L234)), but I have no idea how to fix it. I would really appreciate it if someone could give me some suggestions. $ ./libheif/examples/heif-convert IMG_8262.HEIC foo.png File contains 1 images Written to foo.png lt-heif-convert: image.cc:315: de265_error de265_image::alloc_image(int, int, de265_chroma, std::shared_ptr<const seq_parameter_set>, bool, decoder_context*, encoder_context*, de265_PTS, void*, bool): Assertion `sps->SubWidthC == SubWidthC' failed. Aborted (core dumped) Just in case, `heif-info` is working and the result is like the following (at least there is a depth channel in the input image): $ ./libheif/examples/heif-info IMG_8262.HEIC image: 4032x3024 (id=49), primary thumbnail: 320x240 color profile: prof alpha channel: no depth channel: yes (768x576) z-near: undefined z-far: undefined d-min: 1.172852 d-max: 1.936523 representation: uniform disparity disparity_reference_view: 0 Environment - Ubuntu 16.04
Assertion `sps->SubWidthC == SubWidthC' failed.
https://api.github.com/repos/strukturag/libheif/issues/132/comments
6
2019-05-29T18:39:02Z
2019-12-18T11:45:21Z
https://github.com/strukturag/libheif/issues/132
449,961,353
132
[ "strukturag", "libheif" ]
Can I use this library in a C# app to extract an Image Collection contained in this [HEIC Sample](https://github.com/strukturag/libheif/files/3232354/HEIC.Sample.zip) ? How can I do it? How can add the library to my project ?
Add and Use this Library in a C# project.
https://api.github.com/repos/strukturag/libheif/issues/131/comments
4
2019-05-29T12:15:07Z
2019-06-03T15:44:38Z
https://github.com/strukturag/libheif/issues/131
449,772,339
131
[ "strukturag", "libheif" ]
Hello, I've noticed some problems with small images (less than 128 x 128 pixels). For example, this seems fine: ```shell john@yingna ~/pics $ vips crop k2.png x.png 0 0 128 128 john@yingna ~/pics $ heif-enc x.png -o x.heic john@yingna ~/pics $ heif-info x.heic image: 128x128 (id=1), primary color profile: no alpha channel: no depth channel: no ``` But this mysteriously drops a pixel: ```shell john@yingna ~/pics $ vips crop k2.png x.png 0 0 127 127 john@yingna ~/pics $ heif-enc x.png -o x.heic john@yingna ~/pics $ heif-info x.heic image: 126x126 (id=1), primary color profile: no alpha channel: no depth channel: no ``` And this doesn't work at all: ```shell john@yingna ~/pics $ vips crop k2.png x.png 0 0 128 58 john@yingna ~/pics $ heif-enc x.png -o x.heic Could not encode HEIF file: Encoder plugin generated an error: Invalid parameter value: Images smaller than 16 pixels are not supported ```
errors with small images
https://api.github.com/repos/strukturag/libheif/issues/130/comments
6
2019-05-22T14:49:17Z
2020-07-29T15:39:42Z
https://github.com/strukturag/libheif/issues/130
447,182,266
130
[ "strukturag", "libheif" ]
Hello, I thought you might be interested in the new libvips 8.8 release. It has fairly complete HEIC support via libheif, including support for XMP and EXIF metadata, colour profiles, animated and many-page images, heif thumbnails and lossy and lossless compression. libvips is widely used on the web as an image resize library. It's popular on node, so this should get libheif some more exposure. There are some notes here: https://libvips.github.io/libvips/2019/04/22/What's-new-in-8.8.html For example: ``` $ vips thumbnail dancing_banana2.lossless.webp[n=-1] x.heic[Q=30] 128 $ vips copy x.heic[n=-1] x.gif ``` The `n=-1` means process all pages. It makes this GIF: ![x](https://user-images.githubusercontent.com/580843/57847712-11147600-77cf-11e9-8aaf-94e8e6b6a54a.gif) It doesn't support save alpha to HEIC, unfortunately. You can download libvips rc3 here: https://github.com/libvips/libvips/releases/tag/v8.8.0-rc3 It should be released formally in about a week.
libvips 8.8 now has heic support via libheif
https://api.github.com/repos/strukturag/libheif/issues/129/comments
3
2019-05-16T10:51:04Z
2019-05-22T14:45:20Z
https://github.com/strukturag/libheif/issues/129
444,886,922
129
[ "strukturag", "libheif" ]
Hello, as part of an Ubuntu review of libheif we've run libheif through Coverity. I haven't taken the time to do a detailed investigation of the findings yet, but the handful I looked at did look like they may be real issues. I've stripped out examples and the fuzzer from this list. (It might be worth fixing issues in the examples, so people who copy from them can get the benefit of fixes, but people expect examples to cut corners in the name of clear demonstrations.) I hope this is useful to you. Thanks ``` libheif/bitstream.cc:289 Checker: CHECKED_RETURN libheif/bitstream.cc:271: 1. path: Condition "nBytes < 0", taking false branch. libheif/bitstream.cc:277: 2. path: Condition "this->m_remaining < nBytes", taking false branch. libheif/bitstream.cc:288: 3. path: Condition "this->m_parent_range", taking true branch. libheif/bitstream.cc:289: 4. check_return: Calling "prepare_read" without checking return value (as is done elsewhere 7 out of 8 times). libheif/bitstream.cc:212: Supporting evidence set 1: 5. example_checked: Example 1: "this->prepare_read(4L)" has its value checked in "this->prepare_read(4L)". libheif/bitstream.cc:244: Supporting evidence set 2: 6. example_checked: Example 2: "this->prepare_read(1L)" has its value checked in "this->prepare_read(1L)". libheif/box.cc:196: Supporting evidence set 3: 7. example_checked: Example 3: "range->prepare_read(16L)" has its value checked in "range->prepare_read(16L)". libheif/box.cc:312: Supporting evidence set 4: 8. example_checked: Example 4: "range->prepare_read(content_size)" has its value checked in "range->prepare_read(content_size)". libheif/box.cc:2205: Supporting evidence set 5: 9. example_checked: Example 5: "range->prepare_read(size)" has its value checked in "range->prepare_read(size)". libheif/box.h:68 Checker: UNINIT_CTOR libheif/box.h:80: 1. member_decl: Class member declaration for "numerator". libheif/box.h:68: 2. uninit_member: Non-static class member "numerator" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:80: 3. member_decl: Class member declaration for "denominator". libheif/box.h:68: 4. uninit_member: Non-static class member "denominator" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:191 Checker: UNINIT_CTOR libheif/box.h:211: 1. member_decl: Class member declaration for "m_major_brand". libheif/box.h:191: 2. uninit_member: Non-static class member "m_major_brand" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:212: 3. member_decl: Class member declaration for "m_minor_version". libheif/box.h:191: 4. uninit_member: Non-static class member "m_minor_version" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:192 Checker: UNINIT_CTOR libheif/box.h:211: 1. member_decl: Class member declaration for "m_major_brand". libheif/box.h:192: 2. uninit_member: Non-static class member "m_major_brand" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:212: 3. member_decl: Class member declaration for "m_minor_version". libheif/box.h:192: 4. uninit_member: Non-static class member "m_minor_version" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:255 Checker: UNINIT_CTOR libheif/box.h:272: 1. member_decl: Class member declaration for "m_item_ID". libheif/box.h:255: 2. uninit_member: Non-static class member "m_item_ID" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:256 Checker: UNINIT_CTOR libheif/box.h:272: 1. member_decl: Class member declaration for "m_item_ID". libheif/box.h:256: 2. uninit_member: Non-static class member "m_item_ID" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:349 Checker: UNINIT_CTOR libheif/box.h:380: 1. member_decl: Class member declaration for "m_item_ID". libheif/box.h:349: 2. uninit_member: Non-static class member "m_item_ID" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:381: 3. member_decl: Class member declaration for "m_item_protection_index". libheif/box.h:349: 4. uninit_member: Non-static class member "m_item_protection_index" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:350 Checker: UNINIT_CTOR libheif/box.h:380: 1. member_decl: Class member declaration for "m_item_ID". libheif/box.h:350: 2. uninit_member: Non-static class member "m_item_ID" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:381: 3. member_decl: Class member declaration for "m_item_protection_index". libheif/box.h:350: 4. uninit_member: Non-static class member "m_item_protection_index" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:451 Checker: UNINIT_CTOR libheif/box.h:470: 1. member_decl: Class member declaration for "m_image_width". libheif/box.h:451: 2. uninit_member: Non-static class member "m_image_width" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:471: 3. member_decl: Class member declaration for "m_image_height". libheif/box.h:451: 4. uninit_member: Non-static class member "m_image_height" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:452 Checker: UNINIT_CTOR libheif/box.h:470: 1. member_decl: Class member declaration for "m_image_width". libheif/box.h:452: 2. uninit_member: Non-static class member "m_image_width" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:471: 3. member_decl: Class member declaration for "m_image_height". libheif/box.h:452: 4. uninit_member: Non-static class member "m_image_height" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:532 Checker: UNINIT_CTOR libheif/box.h:542: 1. member_decl: Class member declaration for "m_rotation". libheif/box.h:532: 2. uninit_member: Non-static class member "m_rotation" is not initialized in this constructor nor in any functions that it calls. libheif/box.h:548 Checker: UNINIT_CTOR libheif/box.h:563: 1. member_decl: Class member declaration for "m_axis". libheif/box.h:548: 2. uninit_member: Non-static class member "m_axis" is not initialized in this constructor nor in any functions that it calls. libheif/heif.cc:245 Checker: PW.PARAMETER_HIDDEN libheif/heif.cc:245: 1. parameter_hidden: declaration hides parameter "img" (declared at line 234) libheif/heif.cc:711 Checker: FORWARD_NULL libheif/heif.cc:707: 1. path: Condition "decoder_plugin", taking false branch. libheif/heif.cc:707: 2. var_compare_op: Comparing "decoder_plugin" to null implies that "decoder_plugin" might be null. libheif/heif.cc:711: 3. var_deref_model: Passing null pointer "decoder_plugin" to "register_decoder", which dereferences it. libheif/heif_context.cc:387: 3.1. deref_parm: Directly dereferencing parameter "decoder_plugin". libheif/heif.cc:722 Checker: FORWARD_NULL libheif/heif.cc:718: 1. path: Condition "decoder_plugin", taking false branch. libheif/heif.cc:718: 2. var_compare_op: Comparing "decoder_plugin" to null implies that "decoder_plugin" might be null. libheif/heif.cc:722: 3. var_deref_model: Passing null pointer "decoder_plugin" to "register_decoder", which dereferences it. libheif/heif_plugin_registry.cc:79: 3.1. deref_parm: Directly dereferencing parameter "decoder_plugin". libheif/heif.cc:733 Checker: FORWARD_NULL libheif/heif.cc:729: 1. path: Condition "encoder_plugin", taking false branch. libheif/heif.cc:729: 2. var_compare_op: Comparing "encoder_plugin" to null implies that "encoder_plugin" might be null. libheif/heif.cc:733: 3. var_deref_model: Passing null pointer "encoder_plugin" to "register_encoder", which dereferences it. libheif/heif_plugin_registry.cc:105: 3.1. deref_parm: Directly dereferencing parameter "encoder_plugin". libheif/heif_context.cc:312 Checker: NO_EFFECT libheif/heif_context.cc:312: unsigned_compare: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "image_index >= 0UL". libheif/heif_context.cc:717 Checker: UNINIT_CTOR libheif/heif_context.h:163: 1. member_decl: Class member declaration for "m_thumbnail_ref_id". libheif/heif_context.cc:717: 2. uninit_member: Non-static class member "m_thumbnail_ref_id" is not initialized in this constructor nor in any functions that it calls. libheif/heif_context.h:168: 3. member_decl: Class member declaration for "m_alpha_channel_ref_id". libheif/heif_context.cc:717: 4. uninit_member: Non-static class member "m_alpha_channel_ref_id" is not initialized in this constructor nor in any functions that it calls. libheif/heif_context.h:172: 5. member_decl: Class member declaration for "m_depth_channel_ref_id". libheif/heif_context.cc:717: 6. uninit_member: Non-static class member "m_depth_channel_ref_id" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:429: 7. member_decl: Class member declaration for "version". libheif/heif_context.cc:717: 8. uninit_member: Non-static class member field "m_depth_representation_info.version" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:433: 9. member_decl: Class member declaration for "has_z_near". libheif/heif_context.cc:717: 10. uninit_member: Non-static class member field "m_depth_representation_info.has_z_near" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:434: 11. member_decl: Class member declaration for "has_z_far". libheif/heif_context.cc:717: 12. uninit_member: Non-static class member field "m_depth_representation_info.has_z_far" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:435: 13. member_decl: Class member declaration for "has_d_min". libheif/heif_context.cc:717: 14. uninit_member: Non-static class member field "m_depth_representation_info.has_d_min" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:436: 15. member_decl: Class member declaration for "has_d_max". libheif/heif_context.cc:717: 16. uninit_member: Non-static class member field "m_depth_representation_info.has_d_max" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:438: 17. member_decl: Class member declaration for "z_near". libheif/heif_context.cc:717: 18. uninit_member: Non-static class member field "m_depth_representation_info.z_near" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:439: 19. member_decl: Class member declaration for "z_far". libheif/heif_context.cc:717: 20. uninit_member: Non-static class member field "m_depth_representation_info.z_far" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:440: 21. member_decl: Class member declaration for "d_min". libheif/heif_context.cc:717: 22. uninit_member: Non-static class member field "m_depth_representation_info.d_min" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:441: 23. member_decl: Class member declaration for "d_max". libheif/heif_context.cc:717: 24. uninit_member: Non-static class member field "m_depth_representation_info.d_max" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:443: 25. member_decl: Class member declaration for "depth_representation_type". libheif/heif_context.cc:717: 26. uninit_member: Non-static class member field "m_depth_representation_info.depth_representation_type" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:444: 27. member_decl: Class member declaration for "disparity_reference_view". libheif/heif_context.cc:717: 28. uninit_member: Non-static class member field "m_depth_representation_info.disparity_reference_view" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:446: 29. member_decl: Class member declaration for "depth_nonlinear_representation_model_size". libheif/heif_context.cc:717: 30. uninit_member: Non-static class member field "m_depth_representation_info.depth_nonlinear_representation_model_size" is not initialized in this constructor nor in any functions that it calls. libheif/heif.h:447: 31. member_decl: Class member declaration for "depth_nonlinear_representation_model". libheif/heif_context.cc:717: 32. uninit_member: Non-static class member field "m_depth_representation_info.depth_nonlinear_representation_model" is not initialized in this constructor nor in any functions that it calls. libheif/heif_context.cc:1018 Checker: SIGN_EXTENSION libheif/heif_context.cc:1018: sign_extension: Suspicious implicit sign extension: "grid.get_columns()" with type "uint16_t" (16 bits, unsigned) is promoted in "grid.get_rows() * grid.get_columns()" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "grid.get_rows() * grid.get_columns()" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. libheif/heif_context.cc:1018 Checker: SIGN_EXTENSION libheif/heif_context.cc:1018: sign_extension: Suspicious implicit sign extension: "grid.get_rows()" with type "uint16_t" (16 bits, unsigned) is promoted in "grid.get_rows() * grid.get_columns()" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "grid.get_rows() * grid.get_columns()" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. libheif/heif_context.cc:1036 Checker: SIGN_EXTENSION libheif/heif_context.cc:1036: sign_extension: Suspicious implicit sign extension: "grid.get_columns()" with type "uint16_t" (16 bits, unsigned) is promoted in "x + y * grid.get_columns()" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "x + y * grid.get_columns()" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. libheif/heif_decoder_libde265.cc:98 Checker: RESOURCE_LEAK libheif/heif_decoder_libde265.cc:91: 1. alloc_arg: "heif_image_create" allocates memory that is stored into "out_img". libheif/heif.cc:478: 1.1. alloc_fn: Storage is returned from allocation function "operator new". libheif/heif.cc:478: 1.2. assign: Assigning: "img" = "new heif_image". libheif/heif.cc:483: 1.3. assign: Assigning: "*image" = "img". libheif/heif_decoder_libde265.cc:97: 2. path: Condition "err.code != heif_error_Ok", taking true branch. libheif/heif_decoder_libde265.cc:98: 3. leaked_storage: Variable "out_img" going out of scope leaks the storage it points to. libheif/heif_decoder_libde265.cc:121 Checker: RESOURCE_LEAK libheif/heif_decoder_libde265.cc:91: 1. alloc_arg: "heif_image_create" allocates memory that is stored into "out_img". libheif/heif.cc:478: 1.1. alloc_fn: Storage is returned from allocation function "operator new". libheif/heif.cc:478: 1.2. assign: Assigning: "img" = "new heif_image". libheif/heif.cc:483: 1.3. assign: Assigning: "*image" = "img". libheif/heif_decoder_libde265.cc:97: 2. path: Condition "err.code != heif_error_Ok", taking false branch. libheif/heif_decoder_libde265.cc:110: 3. path: Condition "c < 3", taking true branch. libheif/heif_decoder_libde265.cc:119: 4. noescape: Resource "out_img" is not freed or pointed-to in "heif_image_add_plane". libheif/heif.cc:534: 4.1. noescape: "heif_image_add_plane(heif_image *, heif_channel, int, int, int)" does not free or save its parameter "image". libheif/heif_decoder_libde265.cc:120: 5. path: Condition "err.code != heif_error_Ok", taking true branch. libheif/heif_decoder_libde265.cc:121: 6. leaked_storage: Variable "out_img" going out of scope leaks the storage it points to. ```
coverity results
https://api.github.com/repos/strukturag/libheif/issues/128/comments
4
2019-05-08T01:28:22Z
2019-10-25T01:05:11Z
https://github.com/strukturag/libheif/issues/128
441,510,478
128
[ "strukturag", "libheif" ]
Something similar to commands exiftool, exiv2 and jhead. So I can change image time and date, set image title, description and other metadata. Exiftool is already capable of READING HEIF metadata, but not write. Thank you in advance
Please provide command line tool to write EXIF/XMP metadata to HEIF files
https://api.github.com/repos/strukturag/libheif/issues/127/comments
7
2019-05-06T09:21:11Z
2020-08-06T17:31:14Z
https://github.com/strukturag/libheif/issues/127
440,611,094
127
[ "strukturag", "libheif" ]
How to convert lossless raw photos (DNG, CR2) to lossless HEIC with the command line ? Complete, copying tags and all. HEIC lossless compression yields to ~70% compression (HEIC size is 70% of the original file size) when compared to DNG and ~30% (HEIC size is 30% of the original file size) when compared to Canon raw CR2 formats. https://avi.alkalay.net/2018/08/heic-lossless-images.html Thank you
Please provide receipt to convert raw DNG and CR2 to lossless HEIC
https://api.github.com/repos/strukturag/libheif/issues/126/comments
3
2019-05-06T09:17:10Z
2021-06-18T13:49:31Z
https://github.com/strukturag/libheif/issues/126
440,609,689
126
[ "strukturag", "libheif" ]
As of 995a428, `heif-convert $FILE /tmp/test.png` may report a heap-buffer-overflow at heif_context.h:126 when libheif is compiled with AddressSanitizer. ``` ================================================================= ==20622==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030000004e8 at pc 0x7ffff78fe476 bp 0x7fffffff8960 sp 0x7fffffff8958 WRITE of size 8 at 0x6030000004e8 thread T0 #0 0x7ffff78fe475 in std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2> const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:1122:69 #1 0x7ffff78fb1d6 in std::shared_ptr<heif::HeifContext::Image>::operator=(std::shared_ptr<heif::HeifContext::Image> const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr.h:296:65 #2 0x7ffff792ab5b in heif::HeifContext::Image::set_depth_channel(std::shared_ptr<heif::HeifContext::Image>) /home/hongxu/FOT/libheif/libheif-asan/libheif/./heif_context.h:126:75 #3 0x7ffff790d188 in heif::HeifContext::interpret_heif_file() /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:604:34 #4 0x7ffff79103b4 in heif::HeifContext::read_from_file(char const*) /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:351:10 #5 0x7ffff78e3ec6 in heif_context_read_from_file /home/hongxu/FOT/libheif/libheif-asan/libheif/heif.cc:184:29 #6 0x4f84bd in main /home/hongxu/FOT/libheif/libheif-asan/examples/heif_convert.cc:164:9 #7 0x7ffff5dd5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #8 0x41cf49 in _start (/home/hongxu/FOT/libheif/libheif-asan/install/bin/heif-convert+0x41cf49) 0x6030000004e8 is located 8 bytes to the left of 27-byte region [0x6030000004f0,0x60300000050b) freed by thread T0 here: #0 0x4f4c12 in operator delete(void*) (/home/hongxu/FOT/libheif/libheif-asan/install/bin/heif-convert+0x4f4c12) #1 0x7ffff790c8cb in heif::HeifContext::interpret_heif_file() /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:574:15 #2 0x7ffff79103b4 in heif::HeifContext::read_from_file(char const*) /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:351:10 #3 0x7ffff78e3ec6 in heif_context_read_from_file /home/hongxu/FOT/libheif/libheif-asan/libheif/heif.cc:184:29 #4 0x4f84bd in main /home/hongxu/FOT/libheif/libheif-asan/examples/heif_convert.cc:164:9 #5 0x7ffff5dd5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 previously allocated by thread T0 here: #0 0x4f3fd2 in operator new(unsigned long) (/home/hongxu/FOT/libheif/libheif-asan/install/bin/heif-convert+0x4f3fd2) #1 0x7ffff6c8e26c in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x12726c) #2 0x1000001f7837b56 (<unknown module>) #3 0x60600000025f (<unknown module>) SUMMARY: AddressSanitizer: heap-buffer-overflow /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:1122:69 in std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2> const&) Shadow bytes around the buggy address: 0x0c067fff8040: 00 fa fa fa 00 00 00 fa fa fa fd fd fd fd fa fa 0x0c067fff8050: 00 00 00 01 fa fa 00 00 00 fa fa fa fd fd fd fd 0x0c067fff8060: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x0c067fff8070: 00 07 fa fa fd fd fd fd fa fa 00 00 00 00 fa fa 0x0c067fff8080: 00 00 00 00 fa fa fd fd fd fd fa fa 00 00 00 00 =>0x0c067fff8090: fa fa fd fd fd fa fa fa fd fd fd fd fa[fa]fd fd 0x0c067fff80a0: fd fd fa fa fd fd fd fd fa fa fa fa fa fa fa fa 0x0c067fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==20622==ABORTING ``` [libheif-995a428.zip](https://github.com/strukturag/libheif/files/3084108/libheif-995a428.zip) (also available [here](https://github.com/ntu-sec/pocs/tree/master/libheif/995a428/crashes))
AddressSanitizer: heap-buffer-overflow at heif_context.h:126
https://api.github.com/repos/strukturag/libheif/issues/125/comments
1
2019-04-16T09:37:01Z
2019-04-16T13:41:22Z
https://github.com/strukturag/libheif/issues/125
433,679,616
125
[ "strukturag", "libheif" ]
I saw heif_context_add_exif_metadata and heif_context_add_XMP_metadata but nothing about IPTC. I know its replaced by XMP but there is still pictures with this metadata inside. heif_image_handle_get_metadata_content_type gives "application/rdf+xml" How can i add this xml ? see : http://metadatadeluxe.pbworks.com/w/page/20792260/Photoshop%20Panels%20-%20IPTC%20and%20ARTstor Thank you
Iptc metadata
https://api.github.com/repos/strukturag/libheif/issues/124/comments
33
2019-04-14T19:50:31Z
2022-02-09T05:57:10Z
https://github.com/strukturag/libheif/issues/124
433,025,287
124
[ "strukturag", "libheif" ]
As of dcbfa77, `./heif-convert $FILE /tmp/test.png` may report a heap-use-after-free error when libheif is compiled with AddressSanitizer. ``` ==16294==ERROR: AddressSanitizer: heap-use-after-free on address 0x6030000004a0 at pc 0x7ffff78fe3f6 bp 0x7fffffff89a0 sp 0x7fffffff8998 WRITE of size 8 at 0x6030000004a0 thread T0 #0 0x7ffff78fe3f5 in std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2> const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:1122:69 #1 0x7ffff78fb156 in std::shared_ptr<heif::HeifContext::Image>::operator=(std::shared_ptr<heif::HeifContext::Image> const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr.h:296:65 #2 0x7ffff792a808 in heif::HeifContext::Image::set_alpha_channel(std::shared_ptr<heif::HeifContext::Image>) /home/hongxu/FOT/libheif/libheif-asan/libheif/./heif_context.h:117:75 #3 0x7ffff790cba1 in heif::HeifContext::interpret_heif_file() /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:584:34 #4 0x7ffff7910164 in heif::HeifContext::read_from_file(char const*) /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:351:10 #5 0x7ffff78e3e46 in heif_context_read_from_file /home/hongxu/FOT/libheif/libheif-asan/libheif/heif.cc:184:29 #6 0x4f84bd in main /home/hongxu/FOT/libheif/libheif-asan/examples/heif_convert.cc:164:9 #7 0x7ffff5dd5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #8 0x41cf49 in _start (/home/hongxu/FOT/libheif/libheif-asan/install/bin/heif-convert+0x41cf49) 0x6030000004a0 is located 16 bytes inside of 27-byte region [0x603000000490,0x6030000004ab) freed by thread T0 here: #0 0x4f4c12 in operator delete(void*) (/home/hongxu/FOT/libheif/libheif-asan/install/bin/heif-convert+0x4f4c12) #1 0x7ffff790c82e in heif::HeifContext::interpret_heif_file() /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:574:15 #2 0x7ffff7910164 in heif::HeifContext::read_from_file(char const*) /home/hongxu/FOT/libheif/libheif-asan/libheif/heif_context.cc:351:10 #3 0x7ffff78e3e46 in heif_context_read_from_file /home/hongxu/FOT/libheif/libheif-asan/libheif/heif.cc:184:29 #4 0x4f84bd in main /home/hongxu/FOT/libheif/libheif-asan/examples/heif_convert.cc:164:9 #5 0x7ffff5dd5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 previously allocated by thread T0 here: #0 0x4f3fd2 in operator new(unsigned long) (/home/hongxu/FOT/libheif/libheif-asan/install/bin/heif-convert+0x4f3fd2) #1 0x7ffff6c8e26c in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x12726c) #2 0x60600000031f (<unknown module>) LLVMSymbolizer: error reading file: No such file or directory #3 0x7fffffff929f ([stack]+0x1d29f) SUMMARY: AddressSanitizer: heap-use-after-free /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/shared_ptr_base.h:1122:69 in std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<heif::HeifContext::Image, (__gnu_cxx::_Lock_policy)2> const&) Shadow bytes around the buggy address: 0x0c067fff8040: 00 fa fa fa fd fd fd fd fa fa 00 00 00 01 fa fa 0x0c067fff8050: 00 00 00 fa fa fa fd fd fd fd fa fa 00 00 00 fa 0x0c067fff8060: fa fa 00 00 00 fa fa fa 00 00 00 07 fa fa fd fd 0x0c067fff8070: fd fd fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa 0x0c067fff8080: fd fd fd fd fa fa 00 00 00 00 fa fa fd fd fd fa =>0x0c067fff8090: fa fa fd fd[fd]fd fa fa fd fd fd fd fa fa fa fa 0x0c067fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==16294==ABORTING ``` zipped POCs: [libheif.zip](https://github.com/strukturag/libheif/files/3077346/libheif.zip)
AddressSanitizer: heap-use-after-free at heif_context.h:117
https://api.github.com/repos/strukturag/libheif/issues/123/comments
2
2019-04-14T12:30:34Z
2019-04-28T12:52:59Z
https://github.com/strukturag/libheif/issues/123
432,969,471
123
[ "strukturag", "libheif" ]
Hello, Loading and writing an image with heif_encoder_set_lossless(encoder, 1); then loading it give differents pixels. Simplified code : `heif_context_read_from_file ( https://github.com/nokiatech/heif_conformance/blob/master/conformance_files/C004.heic ) heif_context_get_primary_image_handle heif_image_handle_has_alpha_channel (for rgb or rgba in decode_image) heif_decode_image heif_image_get_bits_per_pixel heif_image_get_width heif_image_get_height heif_image_get_plane_readonly for (i = 0; i < height; ++i) { plane = data + i * stride; for (j = 0; j < width; ++j) { from = j * bytes_per_pixel; for (x = from; x < from + bytes_per_pixel; ++x) { printf"%d:",plane[x]); } } } heif_context_get_encoder_for_format (heif_compression_HEVC) heif_encoder_set_lossless 1 heif_context_encode_image heif_context_write_to_file (new file)` First 32 bytes 80:98:114:86:104:120:92:110:126:83:101:117:84:102:118:84:102:118:91:109:125:87:105:121:88:106:122:91:109:125:85:103 and `heif_context_read_from_file (new file) heif_context_get_primary_image_handle heif_image_handle_has_alpha_channel (for rgb or rgba in decode_image) heif_decode_image heif_image_get_bits_per_pixel heif_image_get_width heif_image_get_height heif_image_get_plane_readonly for (i = 0; i < height; ++i) { plane = data1 + i * planeNo; for (j = 0; j < width; ++j) { from = j * bytes_per_pixel; for (x = from; x < from + bytes_per_pixel; ++x) { printf"%d:",plane[x]); } } }` First 32 bytes 78:98:113:84:104:119:90:110:125:81:101:116:82:102:117:82:102:117:89:109:124:85:105:120:86:106:121:89:109:124:83:103 We can see bytes 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31 are differents. Why these differences ? Thank you
Loading, writing an image then loading it give differents pixels randomly
https://api.github.com/repos/strukturag/libheif/issues/122/comments
4
2019-04-12T14:11:04Z
2019-04-12T15:39:45Z
https://github.com/strukturag/libheif/issues/122
432,586,269
122
[ "strukturag", "libheif" ]
Your example : // decode the image and convert colorspace to RGB, saved as 24bit interleaved heif_image* img; heif_decode_image(handle, &img, heif_colorspace_RGB, heif_chroma_interleaved_24bit, nullptr); failed Even after being fixed : // decode the image and convert colorspace to RGB, saved as 24bit interleaved struct heif_image *img; struct heif_error err = heif_decode_image(handle, &img, heif_colorspace_RGB, heif_chroma_interleaved_RGB, NULL); i got the message : "Unsupported feature: Unsupported codec" Why ?
Api example failed
https://api.github.com/repos/strukturag/libheif/issues/121/comments
2
2019-04-10T12:57:56Z
2019-04-11T07:42:19Z
https://github.com/strukturag/libheif/issues/121
431,488,929
121
[ "strukturag", "libheif" ]
## Env: OS: macOS 10.14 Version: Using branch `avif` (cid: 0edf8a3), with the both aom v1.0.0 and aom v1.0.0-errata1 ## Usage Using a simple image viewer app, which based on libheif and can sucessfuly decoding all HEIC images. Trying to switch to `avif` branch, set the `USE_AOM` and build libheif to support AVIF. ## Test Image: Using both the image sample from http://download.opencontent.netflix.com/?prefix=AV1/Chimera/AVIF/. ## Result The color showing green overlay for AVIF images. See the screenshot: ![image](https://user-images.githubusercontent.com/6919743/55649747-6182d600-5816-11e9-9034-7ccf705e6ed3.png) The image viewer code, using the exact same for HEIF and AVIF. I think from the user side, there don't need any code update (using the `heif_decode_image` API). The left one is one HEIC image from nokia sample, looks great: http://nokiatech.github.io/heif/content/images/ski_jump_1440x960.heic The right one is one AVIF image from netflix sample, looks green and cropped: http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/Chimera/AVIF/Chimera-AV1-8bit-1280x720-3363kbps-100.avif The correct render result should be like this (using a online view page, which based on Chrome's built-in AV1 codec polyfill, here: https://kagami.github.io/avif.js/) ![9c432007-ea11-4985-bd26-cbb6a45af6d0](https://user-images.githubusercontent.com/6919743/55649991-0f8e8000-5817-11e9-8bc8-9c3d307e63de.jpg)
AVIF experimental branch `avif` seems not working, the image color turned green and cropped
https://api.github.com/repos/strukturag/libheif/issues/120/comments
1
2019-04-05T18:53:46Z
2019-04-14T12:39:04Z
https://github.com/strukturag/libheif/issues/120
429,890,910
120
[ "strukturag", "libheif" ]
Hi! I just implemented color profile saving/loading for HEIF in the GIMP plug-in with your new API on libheif 1.4.0 (on master branch only), but I have a question: the `heif_color_profile_type` has a `heif_color_profile_type_rICC` and a `heif_color_profile_type_prof`. What is the difference? Looking how you use the API in example files of your repo, you seem to use "prof" as meaning ICC profiles. In particular, in `examples/heif_enc.cc`, you set twice `heif_image_set_raw_color_profile(image, "prof" […])` while using ICC raw data. And well, while I am here, can I ask what is a "nclx" profile? A web search or Wikipedia don't seem to know about this!
Question about color profile support
https://api.github.com/repos/strukturag/libheif/issues/119/comments
6
2019-04-01T14:56:20Z
2020-09-12T08:37:25Z
https://github.com/strukturag/libheif/issues/119
427,753,370
119
[ "strukturag", "libheif" ]
I found some input causing leak memory. This is crash information. ``` INFO: Seed: 3904123746 INFO: Loaded 1 modules (50397 inline 8-bit counters): 50397 [0x1267560, 0x1273a3d), INFO: Loaded 1 PC tables (50397 PCs): 50397 [0x1273a40,0x1338810), ./encoder-fuzzer: Running 1 inputs 1 time(s) each. Running: leak-034018c6753ae7d385399bf5c3071ba3863a95c8 ================================================================= ==30238==ERROR: LeakSanitizer: detected memory leaks Direct leak of 984 byte(s) in 1 object(s) allocated from: #0 0x4b2f4e in posix_memalign /src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:218 #1 0xc2f80c in x265::x265_malloc(unsigned long) /src/x265/source/common/common.cpp:81:9 #2 0xc302d9 in x265_param_alloc /src/x265/source/common/param.cpp:95:25 #3 0x7f059d in x265_encoder_open_169 /src/x265/source/encoder/api.cpp:97:37 #4 0x6082d0 in x265_encode_image(void*, heif_image const*, heif_image_input_class) /src/libheif/libheif/heif_encoder_x265.cc:707:22 #5 0x5d52d4 in heif::HeifContext::Image::encode_image_as_hevc(std::__1::shared_ptr<heif::HeifPixelImage>, heif_encoder*, heif_encoding_options const*, heif_image_input_class) /src/libheif/libheif/heif_context.cc:1700:27 #6 0x5d4791 in heif::HeifContext::encode_image(std::__1::shared_ptr<heif::HeifPixelImage>, heif_encoder*, heif_encoding_options const*, heif_image_input_class, std::__1::shared_ptr<heif::HeifContext::Image>&) /src/libheif/libheif/heif_context.cc:1608:28 #7 0x5b8f47 in heif_context_encode_image /src/libheif/libheif/heif.cc:1561:25 #8 0x60bfa8 in LLVMFuzzerTestOneInput /src/libheif/libheif/encoder_fuzzer.cc:161:9 #9 0x6465f5 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:529:15 #10 0x60e076 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/libfuzzer/FuzzerDriver.cpp:286:6 #11 0x619ba3 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:715:9 #12 0x60d6ec in main /src/libfuzzer/FuzzerMain.cpp:19:10 #13 0x7f9cd365582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: 984 byte(s) leaked in 1 allocation(s). ``` Do you think this is a bug? I want to report to you so that I can fix this soon.
Leak memory
https://api.github.com/repos/strukturag/libheif/issues/118/comments
2
2019-03-14T13:36:32Z
2019-03-14T13:43:24Z
https://github.com/strukturag/libheif/issues/118
421,022,267
118
[ "strukturag", "libheif" ]
Hello, thank you for this nice library! I've used it to [add heic support to libvips](https://github.com/libvips/libvips/issues/671). I've been having problems trying to disable the autorotate feature. libheif does not seem to report the width and height of transformed images consistently. For example, with this test program: ```C /* compile with * * gcc -g -Wall heif.c `pkg-config libheif --cflags --libs` * */ #include <stdio.h> #include <libheif/heif.h> int main( int argc, char **argv ) { struct heif_context *context; struct heif_image_handle *handle; struct heif_error error; context = heif_context_alloc(); error = heif_context_read_from_file( context, argv[1], NULL ); if( error.code ) { fprintf( stderr, "%s", error.message ); return( -1 ); } error = heif_context_get_primary_image_handle( context, &handle ); if( error.code ) { fprintf( stderr, "%s", error.message ); return( -1 ); } printf( "%s: width = %d\n", argv[1], heif_image_handle_get_width( handle ) ); printf( "%s: height = %d\n", argv[1], heif_image_handle_get_height( handle ) ); heif_image_handle_release( handle ); heif_context_free( context ); return( 0 ); } ``` And these two sample images: https://trac.ffmpeg.org/attachment/ticket/6521/IMG_4479.HEIC https://github.com/libvips/libvips/blob/master/test/test-suite/images/Example1.heic I see: ``` $ ./a.out ~/pics/IMG_4479.HEIC /home/john/pics/IMG_4479.HEIC: width = 3024 /home/john/pics/IMG_4479.HEIC: height = 4032 $ ./a.out ~/pics/Example1.heic /home/john/pics/Example1.heic: width = 4032 /home/john/pics/Example1.heic: height = 3024 ``` Both images are EXIF orientation 6 and both (obviously) are 4032 across and 3024 down when untransformed, but only the first seems to report the rotated width/height in libheif.
possible bug: inconsistent reporting of width/height of rotated images
https://api.github.com/repos/strukturag/libheif/issues/117/comments
4
2019-03-06T15:36:53Z
2019-03-06T17:19:31Z
https://github.com/strukturag/libheif/issues/117
417,868,503
117
[ "strukturag", "libheif" ]
Issue in Cent OS 6, autoconf (GNU Autoconf) 2.69 warning: macro `AM_EXTRA_RECURSIVE_TARGETS' not found in library Log: [root@ctpf01 libheif-1.4.0]# ./autogen.sh autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 configure.ac:47: warning: macro `AM_EXTRA_RECURSIVE_TARGETS' not found in library configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:30: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:5343: _LT_LANG_CXX_CONFIG is expanded from... m4/libtool.m4:785: _LT_LANG is expanded from... m4/libtool.m4:768: LT_LANG is expanded from... configure.ac:30: the top level autoreconf: configure.ac: tracing configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:30: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:5343: _LT_LANG_CXX_CONFIG is expanded from... m4/libtool.m4:785: _LT_LANG is expanded from... m4/libtool.m4:768: LT_LANG is expanded from... configure.ac:30: the top level autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' configure.ac:47: warning: macro `AM_EXTRA_RECURSIVE_TARGETS' not found in library configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:30: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:5343: _LT_LANG_CXX_CONFIG is expanded from... m4/libtool.m4:785: _LT_LANG is expanded from... m4/libtool.m4:768: LT_LANG is expanded from... configure.ac:30: the top level autoreconf: running: /usr/local/bin/autoconf --force configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:24: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... m4/libtool.m4:138: _LT_SETUP is expanded from... m4/libtool.m4:67: LT_INIT is expanded from... configure.ac:24: the top level configure.ac:30: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... m4/libtool.m4:5343: _LT_LANG_CXX_CONFIG is expanded from... m4/libtool.m4:785: _LT_LANG is expanded from... m4/libtool.m4:768: LT_LANG is expanded from... configure.ac:30: the top level configure.ac:47: error: possibly undefined macro: AM_EXTRA_RECURSIVE_TARGETS If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/local/bin/autoconf failed with exit status: 1 [root@ctpf01 libheif-1.4.0]# ^C [root@ctpf01 libheif-1.4.0]# ^C [root@ctpf01 libheif-1.4.0]# autoconf --version autoconf (GNU Autoconf) 2.69 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+/Autoconf: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille.
warning: macro `AM_EXTRA_RECURSIVE_TARGETS' not found in library
https://api.github.com/repos/strukturag/libheif/issues/116/comments
1
2019-03-05T12:33:32Z
2019-03-05T12:41:34Z
https://github.com/strukturag/libheif/issues/116
417,276,327
116
[ "strukturag", "libheif" ]
Hi In your build script you're relying exclusively on a PPA, here https://github.com/strukturag/libheif/blob/master/scripts/install-ci-linux.sh#L53 Is it possible to have the same as the previous lib, a non-PPA alternative, for debian packaging ? I'm trying to get libheif for imagemagick on our debian stretch servers. Best regards,
Build without PPA ?
https://api.github.com/repos/strukturag/libheif/issues/115/comments
3
2019-03-05T09:07:39Z
2019-03-05T09:49:38Z
https://github.com/strukturag/libheif/issues/115
417,189,837
115
[ "strukturag", "libheif" ]
I am trying to build libheif. Setup: CentOS release 6.10 (Final) Steps to reproduce: 1. Cloned libde265 2. Compiling libde265 $ ./autogen.sh ```configure.ac:4: error: Autoconf version 2.68 or higher is required``` Fixed by getting autconf2.69 from http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz 3. Configured libde265 $ ./configure --disable-dec265 --disable-sherlock265 ```configure: error: *** A compiler with support for C++11 language features is required.``` Fixed by getting gcc 4.7.2 4. Successful compiled libde265 5. Cloned libheif 6. Compiling libheif $ ./autogen.sh Before updating automake: ```configure.ac:8: error: possibly undefined macro: AC_SUBST``` Before updating pkg-config: ```configure.ac:47: error: possibly undefined macro: AM_EXTRA_RECURSIVE_TARGETS``` Updated automake to 1.14 and pkg-config to 0.29 7. Configuring libheif $ ./configure Successful with libde265 decoder: yes $ make ```shell make all-recursive make[1]: Entering directory `/home/vagrant/libheif' Making all in libheif make[2]: Entering directory `/home/vagrant/libheif/libheif' depbase=`echo box_fuzzer.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ /opt/centos/devtoolset-1.1/root/usr/bin/c++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -MT box_fuzzer.o -MD -MP -MF $depbase.Tpo -c -o box_fuzzer.o box_fuzzer.cc &&\ mv -f $depbase.Tpo $depbase.Po depbase=`echo encoder_fuzzer.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ /opt/centos/devtoolset-1.1/root/usr/bin/c++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -MT encoder_fuzzer.o -MD -MP -MF $depbase.Tpo -c -o encoder_fuzzer.o encoder_fuzzer.cc &&\ mv -f $depbase.Tpo $depbase.Po encoder_fuzzer.cc: In destructor ‘MemoryWriter::~MemoryWriter()’: encoder_fuzzer.cc:84:15: error: ‘free’ was not declared in this scope encoder_fuzzer.cc: In member function ‘void MemoryWriter::write(const void*, size_t)’: encoder_fuzzer.cc:93:68: error: ‘malloc’ was not declared in this scope encoder_fuzzer.cc:97:19: error: ‘free’ was not declared in this scope make[2]: *** [encoder_fuzzer.o] Error 1 make[2]: Leaving directory `/home/vagrant/libheif/libheif' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/vagrant/libheif' make: *** [all] Error 2 ```
Cannot compile libheif
https://api.github.com/repos/strukturag/libheif/issues/114/comments
2
2019-03-01T18:18:54Z
2019-03-04T15:09:41Z
https://github.com/strukturag/libheif/issues/114
416,222,665
114
[ "strukturag", "libheif" ]
Any reason why the js or enscriptem build doesn't include the encoder?
Javascript Encoder
https://api.github.com/repos/strukturag/libheif/issues/113/comments
3
2019-02-19T16:52:50Z
2019-04-25T17:25:29Z
https://github.com/strukturag/libheif/issues/113
412,024,201
113
[ "strukturag", "libheif" ]
I am trying to run the `heif-enc` script. I have installed `libde265` and `x265` library through `brew`. After running a command like this ``` ./heif-enc test/dp_0.JPG test/dp_1.JPG test/dp_3.JPG ``` I am getting this error ``` No HEVC encoder available. ``` What am I missing? Please help me out. I am very new to these.
No HEVC encoder available.
https://api.github.com/repos/strukturag/libheif/issues/112/comments
1
2019-02-15T17:51:59Z
2019-02-19T18:33:50Z
https://github.com/strukturag/libheif/issues/112
410,878,543
112
[ "strukturag", "libheif" ]
This [file](http://bitwombat.com.au/IMG_3630.HEIC) causes heif-convert to report: Input file is not an HEIF file The file was generated by the camera on iOS 12.
heif-convert reports "Input file is not an HEIF file" on iOS-generated file
https://api.github.com/repos/strukturag/libheif/issues/111/comments
3
2019-02-05T00:50:10Z
2019-02-05T10:05:39Z
https://github.com/strukturag/libheif/issues/111
406,585,072
111
[ "strukturag", "libheif" ]
Running heif-convert: $ ./heif-convert IMG_3660.HEIC IMG_3660.jpg File contains 1 images lt-heif-convert: heif_file.cc:369: int heif::HeifFile::get_luma_bits_per_pixel_from_configuration(heif_item_id) const: Assertion `false' failed. Aborted Here's the relevant source code: int HeifFile::get_luma_bits_per_pixel_from_configuration(heif_item_id imageID) const { auto box = m_ipco_box->get_property_for_item_ID(imageID, m_ipma_box, fourcc("hvcC")); std::shared_ptr<Box_hvcC> hvcC_box = std::dynamic_pointer_cast<Box_hvcC>(box); if (hvcC_box) { return hvcC_box->get_configuration().bit_depth_luma; } assert(false); return 8; } .HEIC was generated on a iPhone7 with iOS 12.1.2 installed. User error?
heif-convert runtime errror: Assertion `false' failed
https://api.github.com/repos/strukturag/libheif/issues/110/comments
3
2019-02-04T23:14:10Z
2019-02-05T00:07:58Z
https://github.com/strukturag/libheif/issues/110
406,562,378
110
[ "strukturag", "libheif" ]
libde265 is on my Ubuntu 16.04 system, but ./configure wasn't detecting it (and, for some reason pkg-config isn't either), so I thought I'd compile it from scratch. I want to compile it, and libheif, locally. $ git clone libde265 $ ./configure --prefix=/tmp/root $ make -j8 && make install Happy outputs are now in /tmp/root/lib and /temp/root/include/libde265 Now libheif needs to find it, so my, probably wrong, guesses: $ export LD_LIBRARY_PATH=/tmp/root/lib $ export LDFLAGS="-L/tmp/root/lib" $ export libde265_CFLAGS="-I/tmp/root/include/" $ export libde265_LIBS="-L/tmp/root/lib" I'm sure one of those is wrong, but I don't know gcc well. If I set CFLAGS to /tmp/root/include/libde265 I don't get as far as below. So now: $ ./configure --prefix=/tmp/root checking for libde265... yes configure: libde265 decoder: yes So that looks good. But then: $ make -j8 '/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -I/tmp/root/include/libde265 -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -MT libheif_la-heif_decoder_libde265.lo -MD -MP -MF .deps/libheif_la-heif_decoder_libde265.Tpo -c -o libheif_la-heif_decoder_libde265.lo 'test -f 'heif_decoder_libde265.cc' || echo './''heif_decoder_libde265.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -I/tmp/root/include/libde265 -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -MT libheif_la-heif_decoder_libde265.lo -MD -MP -MF .deps/libheif_la-heif_decoder_libde265.Tpo -c heif_decoder_libde265.cc -fPIC -DPIC -o .libs/libheif_la-heif_decoder_libde265.o heif_decoder_libde265.cc:31:28: fatal error: libde265/de265.h: No such file or directory ' What configure flag or environment variable do I need so it finds the libde265 include files? I don't see my libde265_CFLAGS value getting used...
Newbie help compiling with local libde265
https://api.github.com/repos/strukturag/libheif/issues/109/comments
3
2019-02-04T03:23:18Z
2019-02-04T23:07:32Z
https://github.com/strukturag/libheif/issues/109
406,169,478
109
[ "strukturag", "libheif" ]
Why does the HDR function not allow you to import PNG files?
libheif don't import files PNG {libpng 1.6.37}
https://api.github.com/repos/strukturag/libheif/issues/108/comments
4
2019-02-02T07:17:12Z
2019-02-26T15:06:01Z
https://github.com/strukturag/libheif/issues/108
405,957,341
108
[ "strukturag", "libheif" ]
Functions heif_image_handle_get_width() and heif_image_handle_get_height() provide the width and height of the image without having to decode the compressed data. However, the width and height provided reflect the transformations specified in the image file. If one disables transformations (using heif_decoding_options::ignore_transformations = 1), and then decodes the image, functions heif_image_get_width() and heif_image_get_height() provide the untransformed width and height. However, I would like to be able to get this information without actually decoding the image. Is there, or can you add, functions that would do this? Thanks.
Provide method to obtain width/height of image without transforms.
https://api.github.com/repos/strukturag/libheif/issues/106/comments
5
2019-01-22T21:58:33Z
2019-02-26T15:06:22Z
https://github.com/strukturag/libheif/issues/106
401,972,422
106
[ "strukturag", "libheif" ]
Hi, Trying to get some basic functionality going on for heif in --> heif out. target file gets created with small size and no image data the original heif is apple created ( grid image ) Is this type of implementation supposed to work ? heif_context * hc = heif_context_alloc(); heif_context_read_from_file(hc,file_name.c_str(),0); heif_context_write_to_file(hc,outfile_name.c_str()); heif_context_free(hc); Thanks
Basic reading and writing of heif files
https://api.github.com/repos/strukturag/libheif/issues/105/comments
10
2019-01-22T11:15:16Z
2024-06-20T12:36:54Z
https://github.com/strukturag/libheif/issues/105
401,715,418
105
[ "strukturag", "libheif" ]
Trying to build all static so i can port it easily to the runtime environment, but it fails to link: ``` go build -ldflags '-extldflags "-Wl,-Bstatic -L/usr/local/lib -lde265 -lheif -lMagickCore-7.Q16HDRI -lMagickWand-7.Q16HDRI -Wl,-Bdynamic"' main.go # command-line-arguments /usr/lib/golang/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: /usr/local/lib/libheif.a(libheif_la-heif_decoder_libde265.o): undefined reference to symbol 'de265_free' /usr/bin/ld: note: 'de265_free' is defined in DSO /usr/local/lib//libde265.so.0 so try adding it to the linker command line /usr/local/lib//libde265.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status ```
fails to link
https://api.github.com/repos/strukturag/libheif/issues/104/comments
1
2019-01-18T16:58:59Z
2019-01-20T11:09:03Z
https://github.com/strukturag/libheif/issues/104
400,809,218
104
[ "strukturag", "libheif" ]
CMakeLists has a PACKAGE_VERSION of 1.0.0 and similar NUMERIC_VERSION, while autoconf is on 1.4.0. Easy to fix.
CMakeLists.txt build reports different version than autoconf build
https://api.github.com/repos/strukturag/libheif/issues/102/comments
1
2019-01-09T21:47:40Z
2019-02-01T13:53:31Z
https://github.com/strukturag/libheif/issues/102
397,576,021
102
[ "strukturag", "libheif" ]
Trying to build GO with static libraries so it would run on AWS Lambda. Using Apline with the `musl` static `libc` libraries ```/go/libheif/examples # go version go version go1.9.2 linux/amd64 ``` ``` /go/libheif/examples # cat /etc/os-release NAME="Alpine Linux" ID=alpine VERSION_ID=3.6.2 PRETTY_NAME="Alpine Linux v3.6" HOME_URL="http://alpinelinux.org" BUG_REPORT_URL="http://bugs.alpinelinux.org" /go/libheif/examples # ``` `go build -ldflags '-linkmode external -extldflags "-static"' -o heif-test-go heif-test.go`
cannot build GO example with static libraries
https://api.github.com/repos/strukturag/libheif/issues/101/comments
2
2019-01-07T19:00:34Z
2019-01-07T21:55:46Z
https://github.com/strukturag/libheif/issues/101
396,608,829
101
[ "strukturag", "libheif" ]
on aws ec2 (amazon linux version2) with golang 1.9.4, `make` fails building the GO example: ``` GOPATH=/home/ec2-user/libheif/examples PKG_CONFIG_PATH=/home/ec2-user/libheif CGO_CFLAGS="-I/home/ec2-user/libheif" CGO_LDFLAGS="-L/home/ec2-user/libheif/libheif/.libs" LD_LIBRARY_PATH=/home/ec2-user/libheif/libheif/.libs CGO_ENABLED=0 /home/ec2-user/.asdf/shims/go build -a -ldflags "-linkmode external -extldflags -static" -o heif-test-go heif-test.go go build github.com/strukturag/libheif/go/heif: build constraints exclude all Go files in /home/ec2-user/libheif/examples/src/github.com/strukturag/libheif/go/heif make: *** [heif-test-go] Error 1 ```
cannot build GO example with static libraries
https://api.github.com/repos/strukturag/libheif/issues/100/comments
1
2019-01-07T17:10:27Z
2024-07-08T11:53:22Z
https://github.com/strukturag/libheif/issues/100
396,572,467
100
[ "strukturag", "libheif" ]
Attempting to use the Golang part of this project. Wether using make or the different go commands my colleague and I are getting the same error has shown below. He's tried it in Amazon Linux, I've tried on my local Mac. Also tried go versions 1.9.7 and 1.11.4. src/github.com/strukturag/libheif/go/heif/heif.go:219:36: could not determine kind of name for C.heif_suberror_Unknown_color_profile_type
Go doesn't make or go build. heif_suberror_Unknown_color_profile_type
https://api.github.com/repos/strukturag/libheif/issues/98/comments
3
2018-12-19T01:28:12Z
2019-02-09T03:49:50Z
https://github.com/strukturag/libheif/issues/98
392,404,056
98
[ "strukturag", "libheif" ]
Per the title, please comment out the extraneous call to printf() that prints out the number of channels. Looks like leftover diagnostic output.
Extraneous printf() in libheif/box.cc, function Box_pixi::parse().
https://api.github.com/repos/strukturag/libheif/issues/97/comments
1
2018-12-13T19:16:37Z
2018-12-14T07:55:45Z
https://github.com/strukturag/libheif/issues/97
390,820,941
97
[ "strukturag", "libheif" ]
Dav1d is a better decoder for AV1 video stream than compared to libaom. Their goal is to release their first version which fully supports all AV1 specs by the end of 2018. Yesterday they published a commit with heading - "on road to 0.1.0" They have completed all the milestones for their first released. The release may happen any time now. Here is their repository: [https://code.videolan.org/videolan/dav1d](https://code.videolan.org/videolan/dav1d) And here are their test results: https://docs.google.com/spreadsheets/d/1AO3lDZnpC8pNJffOknY1rIxXwLog_ISwHhO_sv3Xlhg/edit#gid=923904571
Use dav1d instead of libaom for AVIF support
https://api.github.com/repos/strukturag/libheif/issues/96/comments
5
2018-12-11T12:12:21Z
2021-03-17T07:58:59Z
https://github.com/strukturag/libheif/issues/96
389,735,556
96
[ "strukturag", "libheif" ]
I've tried to use libheif to encode pictures to heif. But I found that when I open the encoded pictures in Preview.app, the color becomes unexpected, which looks like the contrast is wrong. ![pic1](https://ws3.sinaimg.cn/large/006tNbRwgy1fxocobfculj32280owu0x.jpg) (left: origin, right: encoded with libheif) I think macOS uses Apple's own CoreImage to deal with heif. I also tried to encode the jpg file with Preview.app and it worked fine. ![pic2](https://ws4.sinaimg.cn/large/006tNbRwgy1fxocobs7nwj32320p4x6p.jpg) (left: origin, right: encoded with CoreImage) After that, I converted these two heic images back to png with libheif. Both of them looked normal without any color problems. So I have a temporary conclusion like this: | Encoder | libheif (heif-convert) | CoreImage (Preview.app) | | ----------------------- | ---------------------- | ----------------------- | | libheif (heif-enc) | YES | NO (pic1) | | CoreImage (Preview.app) | YES | YES (pic2) | We can never know how CoreImage decodes the image. But could we get any ideas from the picture it encoded? Here are the original picture and ones encoded with two libraries: [example.tar.gz](https://github.com/strukturag/libheif/files/2626207/example.tar.gz)
Strange color in Preview.app on macOS
https://api.github.com/repos/strukturag/libheif/issues/95/comments
5
2018-11-28T18:57:29Z
2019-08-02T15:59:07Z
https://github.com/strukturag/libheif/issues/95
385,411,067
95
[ "strukturag", "libheif" ]
Hi, thanks so much for your great work on this, it's really useful! I have a question, I see that in the compiling guide for this project it recommends the frame-parallel branch of libde265, but I see that branch is now somewhat older than master. Is it still recommended to use the frame-parallel branch or should we be using master? Thank you!
QUESTION: is frame-parallel branch of libdbe265 still preferred?
https://api.github.com/repos/strukturag/libheif/issues/94/comments
2
2018-11-18T11:25:57Z
2018-11-22T15:03:47Z
https://github.com/strukturag/libheif/issues/94
381,951,236
94
[ "strukturag", "libheif" ]
see code below: ```cpp struct heif_error heif_context_assign_thumbnail(struct heif_context* ctx, const struct heif_image_handle* thumbnail_image, const struct heif_image_handle* master_image) { Error error = ctx->context->assign_thumbnail(thumbnail_image->image, master_image->image); return error.error_struct(ctx->context.get()); } ``` ```cpp Error HeifContext::assign_thumbnail(std::shared_ptr<Image> master_image, std::shared_ptr<Image> thumbnail_image) { m_heif_file->add_iref_reference(thumbnail_image->get_id(), fourcc("thmb"), { master_image->get_id() }); return Error::Ok; } ``` HeifContext:: assign_thumbnail first parameter is master_image, but in heif_context_assign_thumbnail, calling ctx->context->assign_thumbnail passing thumbnail_image->image!
BUG: heif_context_assign_thumbnail pass wrong thumbnail image and master image
https://api.github.com/repos/strukturag/libheif/issues/93/comments
1
2018-10-31T07:48:05Z
2018-11-21T16:05:17Z
https://github.com/strukturag/libheif/issues/93
375,837,496
93
[ "strukturag", "libheif" ]
Hello, I wanna to write depth data to heic file. but I cannot find the proper API. I find that this labrary only have two APIs to encode and write primary image ( heif_context_encode_image() ) and thumbnail image ( heif_context_encode_thumbnail() ) .So, if I use the former API to encode and write depth data to heic file, the depth map will be a part of primary images. How can I deal with it ? thanks very much.
encode and write depth data to heic file
https://api.github.com/repos/strukturag/libheif/issues/91/comments
15
2018-10-23T08:07:26Z
2023-02-04T17:00:19Z
https://github.com/strukturag/libheif/issues/91
372,862,137
91
[ "strukturag", "libheif" ]
Hello, I've managed to successfully compile libde265 and libheif however every HEIC photo I throw at the library I get the error `Unsupported feature: Unsupported codec`. The following Docker script will compile libde265 and libheif under Debian and then run the example `heif-convert` from this repository but fail with the message above: ```dockerfile FROM buildpack-deps:stretch-scm ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH RUN apt-get update -y && \ apt-get install -y libtool autotools-dev automake libx265-95 libx265-dev cmake libpng-dev libpng++-dev \ libjpeg-dev g++ gcc libc6-dev make pkg-config RUN cd /tmp && \ git clone https://github.com/strukturag/libde265 && \ git clone https://github.com/strukturag/libheif RUN cd /tmp/libde265 && \ git checkout frame-parallel && \ mkdir build && \ cd build && \ cmake .. && make RUN cd /tmp/libheif && \ ./autogen.sh && \ ./configure && \ make RUN cd /tmp/libheif && \ make install RUN cd /tmp/libheif/examples && \ curl -LO https://github.com/strukturag/libheif/raw/gh-pages/example.heic && \ ./heif-convert example.heic example.jpg ``` Please could you advise on how I can overcome this error? Thanks
Unsupported feature: Unsupported codec
https://api.github.com/repos/strukturag/libheif/issues/90/comments
6
2018-10-12T12:19:36Z
2021-09-11T02:13:45Z
https://github.com/strukturag/libheif/issues/90
369,527,507
90
[ "strukturag", "libheif" ]
Apologies if this is not the right place to request a new release, but it would be great to have one that includes fixes related to ImageMagick. For example: - https://github.com/strukturag/libheif/issues/47 - https://github.com/strukturag/libheif/issues/48 - https://github.com/strukturag/libheif/issues/49 - https://github.com/strukturag/libheif/issues/50
New Release Request
https://api.github.com/repos/strukturag/libheif/issues/88/comments
8
2018-10-09T17:59:35Z
2019-04-04T10:03:32Z
https://github.com/strukturag/libheif/issues/88
368,328,344
88
[ "strukturag", "libheif" ]
I find it a bit unusual that the libraryitself is released under LGPL, while the sample code is under GPL. Usually, projects have the same license for the sample code as they have for the library itself, if not something more permissive. The fact that the samples are under GPL puts users in the weird situation where we can’t look at the sample code (whose purpose is to.... well, be a sample) in our applications, unless they get GPL’d too. Combine this with the fact that libheif’s documentation is essentially inexistent (unless i just didn’t look deeply enough), and it makes using the library very complicated. Is there a reason for this unusual licensing choice? (I’d like to use libheif for a personal project that will be open sourced)
Licensing paradox
https://api.github.com/repos/strukturag/libheif/issues/87/comments
5
2018-10-06T14:55:57Z
2018-10-15T16:08:47Z
https://github.com/strukturag/libheif/issues/87
367,464,340
87
[ "strukturag", "libheif" ]
The README sort of implies that heif-convert can convert to PNG or JPG right out of the box but I'm finding that isn't the case. Is there something that needs to be enabled when running the configure script so JPEG support is added? I have jpeg-9c built and installed but the libheif build doesn't see it (configure: JPEG output: no). When I attempt to convert example.heic to jpg I get the following error message, "Unknown file type in example.jpg", hinting that HAVE_LIBJPEG isn't defined.
Adding support for HEIC to JPG conversion ?
https://api.github.com/repos/strukturag/libheif/issues/84/comments
3
2018-09-17T15:09:54Z
2018-09-20T00:22:11Z
https://github.com/strukturag/libheif/issues/84
360,914,960
84
[ "strukturag", "libheif" ]
Hi! At GIMP's we had a report about a file wrongly interpreted as HEIC because of the wrong extension. Normally we are able to avoid this kind of error if we add magic number detection. I couldn't get clear details about what can be considered as HEIC/HEIF magic number. Looking at a few sample images, I found that the string "ftyp" at the 5th bytes seems like a constant in every HEIC/HEIF file. Yet since I understand that HEIC/HEIF is a subformat of ISOBMFF, it looks like this magic number would also detect non-HEIC files which are ISOBMFF, right? At least it also worked with a `.mov` file (unfortunately!). In the various HEIC files I could find, the longer string was either `ftypmif1` or `ftypheic`. Would both these strings qualify as good magic numbers? Can there be other variants? All the files I had in my possession also had the string `mif1heic` at the 16th byte. Is it also a confirmed constant? Can I use this as magic keyword instead? Thanks! :-)
What is HEIF/HEIC magic number?
https://api.github.com/repos/strukturag/libheif/issues/83/comments
10
2018-09-14T15:55:29Z
2018-11-21T16:33:55Z
https://github.com/strukturag/libheif/issues/83
360,361,857
83
[ "strukturag", "libheif" ]
If I understood https://golang.org/pkg/runtime/#SetFinalizer correctly, we don't need to clear the finalizers manually: `This makes obj reachable again, but now without an associated finalizer.` `SetFinalizer(obj, nil)` <- [such function calls](https://github.com/strukturag/libheif/blob/41ec47d12fce7d785ca56c4de95b708f3eb2449b/go/heif/heif.go#L307) can likely be removed.
go: No need to manually clear finalizers
https://api.github.com/repos/strukturag/libheif/issues/78/comments
0
2018-09-10T11:58:15Z
2018-09-21T22:26:29Z
https://github.com/strukturag/libheif/issues/78
358,590,618
78
[ "strukturag", "libheif" ]
The function `HeifContext::is_grid_item` is checking twice for `!m_is_primary`: https://github.com/strukturag/libheif/blob/3245495dba683bea92451d8c118a3f1322fcf21d/libheif/heif_context.h#L161 Can the duplicated check simply be removed, or should it check for something else? This was found by Coverity Scan.
Duplicate condition
https://api.github.com/repos/strukturag/libheif/issues/77/comments
1
2018-09-05T12:21:07Z
2018-09-05T12:53:13Z
https://github.com/strukturag/libheif/issues/77
357,203,075
77
[ "strukturag", "libheif" ]
When extracting multiple images from a HEIC file the code that creates the output filename is using find() to search out the period in the file extension from the path (see heif-convert.cc). This is a problem if the path itself has a period somewhere in it prior to the actual file, ie; /users/username/somedirname.version/filename.ext In the example above the '.' in "somedirname.version" will be found and changed as if it's the output file when the last period is desired. Using output_filename.find_last_of('.') would be a better solution.
Parsing file path to create output filename might be problematic
https://api.github.com/repos/strukturag/libheif/issues/76/comments
1
2018-09-03T12:30:56Z
2018-10-15T12:05:55Z
https://github.com/strukturag/libheif/issues/76
356,487,217
76
[ "strukturag", "libheif" ]
Hello, I have another one of those cursed autoconfig error messages: ``` $ pkg-config --version 0.29.2 $ git pull $ ./autogen.sh hook ... autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /usr/local/bin/autoconf --force configure.ac:40: error: possibly undefined macro: AC_CHECK_HEADER_STDBOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/local/bin/autoconf failed with exit status: 1 ``` In a previous step I could build libde265 successfully though. Thanks for your support! Axel.
autoconfig with undefined macro: AC_CHECK_HEADER_STDBOOL
https://api.github.com/repos/strukturag/libheif/issues/75/comments
3
2018-09-03T10:56:34Z
2018-09-03T14:20:33Z
https://github.com/strukturag/libheif/issues/75
356,456,832
75
[ "strukturag", "libheif" ]
In #64 the CI fuzzer found two potential errors: https://travis-ci.org/strukturag/libheif/jobs/418152399 https://travis-ci.org/strukturag/libheif/jobs/418152401 Please investigate if this is still an error or was already fixed in master.
Investigate fuzzing errors from #64
https://api.github.com/repos/strukturag/libheif/issues/72/comments
4
2018-08-31T12:03:16Z
2018-08-31T13:12:46Z
https://github.com/strukturag/libheif/issues/72
355,953,532
72
[ "strukturag", "libheif" ]
The attached file (and others) convert fine using the sample heif-convert program (to png) on macOS (10.12.6 [IMG_4453.HEIC.zip](https://github.com/strukturag/libheif/files/2324200/IMG_4453.HEIC.zip)), but give "Could not read HEIF file: Invalid input: No 'meta' box" on Windows (7 and 10). I can clearly see the "meta" box tag in a hex editor: bbmbp081:~ vico$ xxd -l 128 projects/apple_formats/media/Archive_from_MikeH/Archive/IMG_4453.HEIC 00000000: 0000 0018 6674 7970 6865 6963 0000 0000 ....ftypheic.... 00000010: 6d69 6631 6865 6963 0000 0f74 6d65 7461 mif1heic...tmeta 00000020: 0000 0000 0000 0022 6864 6c72 0000 0000 ......."hdlr.... Any ideas? (I had to zip the file to attach it.)
heif-convert Windows versus maOS
https://api.github.com/repos/strukturag/libheif/issues/71/comments
8
2018-08-27T14:22:21Z
2018-09-03T06:43:43Z
https://github.com/strukturag/libheif/issues/71
354,340,311
71
[ "strukturag", "libheif" ]
After upgrading from libjpeg-turbo 1.5.3 to 2.0.0 from https://github.com/libjpeg-turbo/libjpeg-turbo/releases/tag/2.0.0, libheif fails to build: ``` (min) hmage@min:~/norm.x86_64-pc-linux-gnu.2.24.haswell.min/tmp/compile/libheif/libheif_libheif-1.3.2.tar.gz$ make make all-recursive make[1]: Entering directory '/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/tmp/compile/libheif/libheif_libheif-1.3.2.tar.gz' Making all in libheif make[2]: Entering directory '/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/tmp/compile/libheif/libheif_libheif-1.3.2.tar.gz/libheif' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/tmp/compile/libheif/libheif_libheif-1.3.2.tar.gz/libheif' Making all in examples make[2]: Entering directory '/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/tmp/compile/libheif/libheif_libheif-1.3.2.tar.gz/examples' c++ -DHAVE_CONFIG_H -I. -I.. -I/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/include -march=native -fdebug-prefix-map=/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min=/build -ffunction-sections -fdata-sections -I.. -I../. -g -O2 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -c -o heif_convert-heif_convert.o `test -f 'heif_convert.cc' || echo './'`heif_convert.cc In file included from /home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/include/jpeglib.h:29:0, from encoder_jpeg.h:27, from heif_convert.cc:38: /home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/include/jconfig.h:39:0: error: "HAVE_STDDEF_H" redefined [-Werror] #define HAVE_STDDEF_H In file included from heif_convert.cc:21:0: ../config.h:38:0: note: this is the location of the previous definition #define HAVE_STDDEF_H 1 In file included from /home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/include/jpeglib.h:29:0, from encoder_jpeg.h:27, from heif_convert.cc:38: /home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/include/jconfig.h:42:0: error: "HAVE_STDLIB_H" redefined [-Werror] #define HAVE_STDLIB_H In file included from heif_convert.cc:21:0: ../config.h:44:0: note: this is the location of the previous definition #define HAVE_STDLIB_H 1 cc1plus: all warnings being treated as errors Makefile:662: recipe for target 'heif_convert-heif_convert.o' failed make[2]: *** [heif_convert-heif_convert.o] Error 1 make[2]: Leaving directory '/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/tmp/compile/libheif/libheif_libheif-1.3.2.tar.gz/examples' Makefile:507: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/hmage/norm.x86_64-pc-linux-gnu.2.24.haswell.min/tmp/compile/libheif/libheif_libheif-1.3.2.tar.gz' Makefile:416: recipe for target 'all' failed make: *** [all] Error 2 ``` Didn't have time yet to track down exactly why, but better have the bugreport rather than not.
Build failure when compiling against libjpeg-turbo 2.0
https://api.github.com/repos/strukturag/libheif/issues/70/comments
3
2018-08-25T10:30:15Z
2018-11-21T15:38:19Z
https://github.com/strukturag/libheif/issues/70
354,002,257
70
[ "strukturag", "libheif" ]
Revision 943361a456fcb8a609deddf06dbea8b7294b704b breaks automatic color profile determination: ```sh ./examples/heif-enc ~/Desktop/rndimg.png Assertion failed: (m_color_profile), function write, file box.cc, line 1693. Abort trap: 6 ``` Conversion works fine without the patch.
Automatic color profile determination is broken
https://api.github.com/repos/strukturag/libheif/issues/66/comments
1
2018-08-20T15:34:57Z
2018-08-20T16:03:07Z
https://github.com/strukturag/libheif/issues/66
352,188,544
66
[ "strukturag", "libheif" ]
I built the heif_covert sample code and ran a simple test to convert an heif file to jpeg, there was no error AND no file. I had forgotten to download and install a jpeg conversion DLL. I recommend adding the following to help others that might forget to include the conversion DLLs file: heif_convert.cc after line 106 - insert the following #if !(HAVE_LIBJPEG || HAVE_LIBPNG) fprintf(stderr, "Your build does not include a PNG or JPG encoder, no conversion possible\n"); return 1; #endif
handle missing image conversion DLL's
https://api.github.com/repos/strukturag/libheif/issues/65/comments
3
2018-08-20T15:26:43Z
2018-08-31T12:43:48Z
https://github.com/strukturag/libheif/issues/65
352,185,237
65
[ "strukturag", "libheif" ]
I used `heif-enc` to convert a png "losslessly" then converted it back to png with `heif-convert` and the results where not lossless. I attached the original png bellow as well as the difference between them (levels increased dramatically). ``` heif-enc -L tree.png heif-convert tree.heic tree.png ``` ![ash_tree_-_geograph org uk_-_590710](https://user-images.githubusercontent.com/8992170/44141670-d46cc212-a04b-11e8-9f3e-c5b18d43594b.png) ![png-heic-png](https://user-images.githubusercontent.com/8992170/44141671-d47c8fd0-a04b-11e8-9a83-af8e1bc9cc2e.png)
Saving in RGB colorspace (was: "heif-enc lossless isn't lossless")
https://api.github.com/repos/strukturag/libheif/issues/62/comments
40
2018-08-15T09:29:46Z
2024-06-27T14:12:06Z
https://github.com/strukturag/libheif/issues/62
350,744,299
62
[ "strukturag", "libheif" ]
Hello all, Will libheif support heif sequence file? I downloaded samples from https://github.com/nokiatech/heif and tried to display the heif sequence file( bird_burst.heic in image_sequences folder). From the heif-info program, it shows up 4 still images but no burst images. I dug the libheif and found no moov box implementation. So I think currently not support for heif sequence file? Will it support in the feature? Thanks
heif sequence file type support?
https://api.github.com/repos/strukturag/libheif/issues/57/comments
0
2018-08-02T09:23:11Z
2018-08-02T09:23:42Z
https://github.com/strukturag/libheif/issues/57
346,929,530
57
[ "strukturag", "libheif" ]
We have address fault error on openning alpha item. And test on gimp and error appears on gimp too. Steps: 1. Open png image on mac Preview 2. Save as Heic with alpha 3. Open image with gimp Plug-in crashed: "file-heif" (/Applications/Gimp-2.10.app/Contents/Resources/lib/gimp/2.0/plug-ins/file-heif) The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side. ![screen shot 2018-07-31 at 3 45 19 pm](https://user-images.githubusercontent.com/14294255/43457730-cb62cb40-94d8-11e8-973d-7b845a61aabe.png)
Cant open images saved with alpha on Mac
https://api.github.com/repos/strukturag/libheif/issues/56/comments
9
2018-07-31T11:45:55Z
2018-12-29T22:13:07Z
https://github.com/strukturag/libheif/issues/56
346,151,978
56
[ "strukturag", "libheif" ]
ImageMagick has used libheif to support HEVC format. Note that it sets hevc encoder is thread support, but decoder is not. I’m here to confirm whether this assumption is correct. Libheif doc does’t mention anything about it.
Thread safe in decoding hevc image
https://api.github.com/repos/strukturag/libheif/issues/55/comments
2
2018-07-30T10:06:17Z
2018-09-03T08:08:38Z
https://github.com/strukturag/libheif/issues/55
345,692,886
55
[ "strukturag", "libheif" ]
CentOS Linux release 7.5.1804 (Core) yum list installed | grep libde libde265.x86_64 0.8-1.el7.nux @nux-dextop libde265-debuginfo.x86_64 0.8-1.el7.nux @nux-dextop libde265-devel.x86_64 0.8-1.el7.nux @nux-dextop libde265-examples.x86_64 0.8-1.el7.nux @nux-dextop Trying to build - libheif-1.3.2 Om master branch the same. # make make all-recursive make[1]: Entering directory `/root/libheif-1.3.2' Making all in libheif make[2]: Entering directory `/root/libheif-1.3.2/libheif' depbase=`echo box_fuzzer.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT box_fuzzer.o -MD -MP -MF $depbase.Tpo -c -o box_fuzzer.o box_fuzzer.cc &&\ mv -f $depbase.Tpo $depbase.Po depbase=`echo encoder_fuzzer.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT encoder_fuzzer.o -MD -MP -MF $depbase.Tpo -c -o encoder_fuzzer.o encoder_fuzzer.cc &&\ mv -f $depbase.Tpo $depbase.Po depbase=`echo file_fuzzer.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT file_fuzzer.o -MD -MP -MF $depbase.Tpo -c -o file_fuzzer.o file_fuzzer.cc &&\ mv -f $depbase.Tpo $depbase.Po rm -f libfuzzers.a ar cru libfuzzers.a box_fuzzer.o encoder_fuzzer.o file_fuzzer.o ranlib libfuzzers.a /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-bitstream.lo -MD -MP -MF .deps/libheif_la-bitstream.Tpo -c -o libheif_la-bitstream.lo `test -f 'bitstream.cc' || echo './'`bitstream.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-bitstream.lo -MD -MP -MF .deps/libheif_la-bitstream.Tpo -c bitstream.cc -fPIC -DPIC -o .libs/libheif_la-bitstream.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-bitstream.lo -MD -MP -MF .deps/libheif_la-bitstream.Tpo -c bitstream.cc -o libheif_la-bitstream.o >/dev/null 2>&1 mv -f .deps/libheif_la-bitstream.Tpo .deps/libheif_la-bitstream.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-box.lo -MD -MP -MF .deps/libheif_la-box.Tpo -c -o libheif_la-box.lo `test -f 'box.cc' || echo './'`box.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-box.lo -MD -MP -MF .deps/libheif_la-box.Tpo -c box.cc -fPIC -DPIC -o .libs/libheif_la-box.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-box.lo -MD -MP -MF .deps/libheif_la-box.Tpo -c box.cc -o libheif_la-box.o >/dev/null 2>&1 mv -f .deps/libheif_la-box.Tpo .deps/libheif_la-box.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-error.lo -MD -MP -MF .deps/libheif_la-error.Tpo -c -o libheif_la-error.lo `test -f 'error.cc' || echo './'`error.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-error.lo -MD -MP -MF .deps/libheif_la-error.Tpo -c error.cc -fPIC -DPIC -o .libs/libheif_la-error.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-error.lo -MD -MP -MF .deps/libheif_la-error.Tpo -c error.cc -o libheif_la-error.o >/dev/null 2>&1 mv -f .deps/libheif_la-error.Tpo .deps/libheif_la-error.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_file.lo -MD -MP -MF .deps/libheif_la-heif_file.Tpo -c -o libheif_la-heif_file.lo `test -f 'heif_file.cc' || echo './'`heif_file.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_file.lo -MD -MP -MF .deps/libheif_la-heif_file.Tpo -c heif_file.cc -fPIC -DPIC -o .libs/libheif_la-heif_file.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_file.lo -MD -MP -MF .deps/libheif_la-heif_file.Tpo -c heif_file.cc -o libheif_la-heif_file.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif_file.Tpo .deps/libheif_la-heif_file.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_image.lo -MD -MP -MF .deps/libheif_la-heif_image.Tpo -c -o libheif_la-heif_image.lo `test -f 'heif_image.cc' || echo './'`heif_image.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_image.lo -MD -MP -MF .deps/libheif_la-heif_image.Tpo -c heif_image.cc -fPIC -DPIC -o .libs/libheif_la-heif_image.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_image.lo -MD -MP -MF .deps/libheif_la-heif_image.Tpo -c heif_image.cc -o libheif_la-heif_image.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif_image.Tpo .deps/libheif_la-heif_image.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif.lo -MD -MP -MF .deps/libheif_la-heif.Tpo -c -o libheif_la-heif.lo `test -f 'heif.cc' || echo './'`heif.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif.lo -MD -MP -MF .deps/libheif_la-heif.Tpo -c heif.cc -fPIC -DPIC -o .libs/libheif_la-heif.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif.lo -MD -MP -MF .deps/libheif_la-heif.Tpo -c heif.cc -o libheif_la-heif.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif.Tpo .deps/libheif_la-heif.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_context.lo -MD -MP -MF .deps/libheif_la-heif_context.Tpo -c -o libheif_la-heif_context.lo `test -f 'heif_context.cc' || echo './'`heif_context.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_context.lo -MD -MP -MF .deps/libheif_la-heif_context.Tpo -c heif_context.cc -fPIC -DPIC -o .libs/libheif_la-heif_context.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_context.lo -MD -MP -MF .deps/libheif_la-heif_context.Tpo -c heif_context.cc -o libheif_la-heif_context.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif_context.Tpo .deps/libheif_la-heif_context.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_hevc.lo -MD -MP -MF .deps/libheif_la-heif_hevc.Tpo -c -o libheif_la-heif_hevc.lo `test -f 'heif_hevc.cc' || echo './'`heif_hevc.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_hevc.lo -MD -MP -MF .deps/libheif_la-heif_hevc.Tpo -c heif_hevc.cc -fPIC -DPIC -o .libs/libheif_la-heif_hevc.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_hevc.lo -MD -MP -MF .deps/libheif_la-heif_hevc.Tpo -c heif_hevc.cc -o libheif_la-heif_hevc.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif_hevc.Tpo .deps/libheif_la-heif_hevc.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_plugin_registry.lo -MD -MP -MF .deps/libheif_la-heif_plugin_registry.Tpo -c -o libheif_la-heif_plugin_registry.lo `test -f 'heif_plugin_registry.cc' || echo './'`heif_plugin_registry.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_plugin_registry.lo -MD -MP -MF .deps/libheif_la-heif_plugin_registry.Tpo -c heif_plugin_registry.cc -fPIC -DPIC -o .libs/libheif_la-heif_plugin_registry.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_plugin_registry.lo -MD -MP -MF .deps/libheif_la-heif_plugin_registry.Tpo -c heif_plugin_registry.cc -o libheif_la-heif_plugin_registry.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif_plugin_registry.Tpo .deps/libheif_la-heif_plugin_registry.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_plugin.lo -MD -MP -MF .deps/libheif_la-heif_plugin.Tpo -c -o libheif_la-heif_plugin.lo `test -f 'heif_plugin.cc' || echo './'`heif_plugin.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_plugin.lo -MD -MP -MF .deps/libheif_la-heif_plugin.Tpo -c heif_plugin.cc -fPIC -DPIC -o .libs/libheif_la-heif_plugin.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_plugin.lo -MD -MP -MF .deps/libheif_la-heif_plugin.Tpo -c heif_plugin.cc -o libheif_la-heif_plugin.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif_plugin.Tpo .deps/libheif_la-heif_plugin.Plo /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_decoder_libde265.lo -MD -MP -MF .deps/libheif_la-heif_decoder_libde265.Tpo -c -o libheif_la-heif_decoder_libde265.lo `test -f 'heif_decoder_libde265.cc' || echo './'`heif_decoder_libde265.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_decoder_libde265.lo -MD -MP -MF .deps/libheif_la-heif_decoder_libde265.Tpo -c heif_decoder_libde265.cc -fPIC -DPIC -o .libs/libheif_la-heif_decoder_libde265.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT libheif_la-heif_decoder_libde265.lo -MD -MP -MF .deps/libheif_la-heif_decoder_libde265.Tpo -c heif_decoder_libde265.cc -o libheif_la-heif_decoder_libde265.o >/dev/null 2>&1 mv -f .deps/libheif_la-heif_decoder_libde265.Tpo .deps/libheif_la-heif_decoder_libde265.Plo /bin/sh ../libtool --tag=CXX --mode=link g++ -fvisibility=hidden -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -version-info 4:2:3 -o libheif.la -rpath /usr/local/lib libheif_la-bitstream.lo libheif_la-box.lo libheif_la-error.lo libheif_la-heif_file.lo libheif_la-heif_image.lo libheif_la-heif.lo libheif_la-heif_context.lo libheif_la-heif_hevc.lo libheif_la-heif_plugin_registry.lo libheif_la-heif_plugin.lo libheif_la-heif_decoder_libde265.lo -lde265 -lpthread libtool: link: rm -fr .libs/libheif.a .libs/libheif.la .libs/libheif.lai .libs/libheif.so .libs/libheif.so.1 .libs/libheif.so.1.3.2 libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginS.o .libs/libheif_la-bitstream.o .libs/libheif_la-box.o .libs/libheif_la-error.o .libs/libheif_la-heif_file.o .libs/libheif_la-heif_image.o .libs/libheif_la-heif.o .libs/libheif_la-heif_context.o .libs/libheif_la-heif_hevc.o .libs/libheif_la-heif_plugin_registry.o .libs/libheif_la-heif_plugin.o .libs/libheif_la-heif_decoder_libde265.o -lde265 -lpthread -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o -O2 -Wl,-soname -Wl,libheif.so.1 -o .libs/libheif.so.1.3.2 libtool: link: (cd ".libs" && rm -f "libheif.so.1" && ln -s "libheif.so.1.3.2" "libheif.so.1") libtool: link: (cd ".libs" && rm -f "libheif.so" && ln -s "libheif.so.1.3.2" "libheif.so") libtool: link: ar cru .libs/libheif.a libheif_la-bitstream.o libheif_la-box.o libheif_la-error.o libheif_la-heif_file.o libheif_la-heif_image.o libheif_la-heif.o libheif_la-heif_context.o libheif_la-heif_hevc.o libheif_la-heif_plugin_registry.o libheif_la-heif_plugin.o libheif_la-heif_decoder_libde265.o libtool: link: ranlib .libs/libheif.a libtool: link: ( cd ".libs" && rm -f "libheif.la" && ln -s "../libheif.la" "libheif.la" ) make[2]: Leaving directory `/root/libheif-1.3.2/libheif' Making all in examples make[2]: Entering directory `/root/libheif-1.3.2/examples' g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT heif_convert-encoder.o -MD -MP -MF .deps/heif_convert-encoder.Tpo -c -o heif_convert-encoder.o `test -f 'encoder.cc' || echo './'`encoder.cc mv -f .deps/heif_convert-encoder.Tpo .deps/heif_convert-encoder.Po g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT heif_convert-heif_convert.o -MD -MP -MF .deps/heif_convert-heif_convert.Tpo -c -o heif_convert-heif_convert.o `test -f 'heif_convert.cc' || echo './'`heif_convert.cc mv -f .deps/heif_convert-heif_convert.Tpo .deps/heif_convert-heif_convert.Po g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT heif_convert-encoder_jpeg.o -MD -MP -MF .deps/heif_convert-encoder_jpeg.Tpo -c -o heif_convert-encoder_jpeg.o `test -f 'encoder_jpeg.cc' || echo './'`encoder_jpeg.cc mv -f .deps/heif_convert-encoder_jpeg.Tpo .deps/heif_convert-encoder_jpeg.Po /bin/sh ../libtool --tag=CXX --mode=link g++ -I.. -I../. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -o heif-convert heif_convert-encoder.o heif_convert-heif_convert.o heif_convert-encoder_jpeg.o ../libheif/libheif.la -ljpeg -lpthread libtool: link: g++ -I.. -I../. -g -O2 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -o .libs/heif-convert heif_convert-encoder.o heif_convert-heif_convert.o heif_convert-encoder_jpeg.o ../libheif/.libs/libheif.so -lde265 -ljpeg -lpthread -Wl,-rpath -Wl,/usr/local/lib ../libheif/.libs/libheif.so: undefined reference to `de265_get_bits_per_pixel' collect2: error: ld returned 1 exit status make[2]: *** [heif-convert] Error 1 make[2]: Leaving directory `/root/libheif-1.3.2/examples' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/libheif-1.3.2' make: *** [all] Error 2
../libheif/.libs/libheif.so: undefined reference to `de265_get_bits_per_pixel'
https://api.github.com/repos/strukturag/libheif/issues/54/comments
1
2018-07-21T13:08:36Z
2024-06-27T14:11:03Z
https://github.com/strukturag/libheif/issues/54
343,325,433
54
[ "strukturag", "libheif" ]
With gcc 7.3 compiling libheif1.3.2 fails with: ``` make all-recursive make[1]: Entering directory '/src/gnome/gimp/libheif-1.3.2' Making all in libheif make[2]: Entering directory '/src/gnome/gimp/libheif-1.3.2/libheif' CXX encoder_fuzzer.o encoder_fuzzer.cc: In function ‘heif_error writer_write(heif_context*, const void*, size_t, void*)’: encoder_fuzzer.cc:112:60: error: unused parameter ‘ctx’ [-Werror=unused-parameter] static struct heif_error writer_write(struct heif_context* ctx, const void* data, size_t size, void* userdata) { ^~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:779: encoder_fuzzer.o] Error 1 CXX file_fuzzer.o file_fuzzer.cc: In function ‘void TestDecodeImage(heif_context*, const heif_image_handle*)’: file_fuzzer.cc:29:50: error: unused parameter ‘ctx’ [-Werror=unused-parameter] static void TestDecodeImage(struct heif_context* ctx, ^~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:779: file_fuzzer.o] Error 1 CXX libheif_la-heif.lo heif.cc: In function ‘int heif_image_handle_get_depth_image_representation_info(const heif_image_handle*, heif_item_id, const heif_depth_representation_info**)’: heif.cc:358:72: error: unused parameter ‘depth_image_id’ [-Werror=unused-parameter] heif_item_id depth_image_id, ^~~~~~~~~~~~~~ heif.cc: In function ‘heif_error heif_image_scale_image(const heif_image*, heif_image**, int, int, const heif_scaling_options*)’: heif.cc:574:77: error: unused parameter ‘options’ [-Werror=unused-parameter] const struct heif_scaling_options* options) ^~~~~~~ heif.cc: In function ‘int heif_context_get_encoder_descriptors(heif_context*, heif_compression_format, const char*, const heif_encoder_descriptor**, int)’: heif.cc:799:63: error: unused parameter ‘ctx’ [-Werror=unused-parameter] int heif_context_get_encoder_descriptors(struct heif_context* ctx, ^~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:838: libheif_la-heif.lo] Error 1 CXX libheif_la-heif_context.lo heif_context.cc: In constructor ‘heif_encoder::heif_encoder(std::shared_ptr<heif::HeifContext>, const heif_encoder_plugin*)’: heif_context.cc:51:63: error: unused parameter ‘_context’ [-Werror=unused-parameter] heif_encoder::heif_encoder(std::shared_ptr<heif::HeifContext> _context, ^~~~~~~~ In file included from heif_hevc.h:24:0, from heif_context.cc:43: heif_context.cc: In member function ‘void ImageOverlay::get_offset(size_t, int32_t*, int32_t*) const’: heif_context.cc:312:21: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] assert(image_index>=0 && image_index<m_offsets.size()); ~~~~~~~~~~~^~~ heif_context.cc: In member function ‘heif::Error heif::HeifContext::encode_image(std::shared_ptr<heif::HeifPixelImage>, heif_encoder*, const heif_encoding_options*, heif_image_input_class, std::shared_ptr<heif::HeifContext::Image>&)’: heif_context.cc:1402:61: error: unused parameter ‘input_class’ [-Werror=unused-parameter] enum heif_image_input_class input_class, ^~~~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:845: libheif_la-heif_context.lo] Error 1 make[2]: Target 'all' not remade because of errors. make[2]: Leaving directory '/src/gnome/gimp/libheif-1.3.2/libheif' Making all in examples make[2]: Entering directory '/src/gnome/gimp/libheif-1.3.2/examples' CXX heif_convert-encoder.o In file included from encoder.cc:30:0: encoder.h: In member function ‘virtual void Encoder::UpdateDecodingOptions(const heif_image_handle*, heif_decoding_options*) const’: encoder.h:35:70: error: unused parameter ‘handle’ [-Werror=unused-parameter] virtual void UpdateDecodingOptions(const struct heif_image_handle* handle, ^~~~~~ encoder.h:36:37: error: unused parameter ‘options’ [-Werror=unused-parameter] struct heif_decoding_options *options) const { ^~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:644: heif_convert-encoder.o] Error 1 CXX heif_convert-heif_convert.o In file included from heif_convert.cc:36:0: encoder.h: In member function ‘virtual void Encoder::UpdateDecodingOptions(const heif_image_handle*, heif_decoding_options*) const’: encoder.h:35:70: error: unused parameter ‘handle’ [-Werror=unused-parameter] virtual void UpdateDecodingOptions(const struct heif_image_handle* handle, ^~~~~~ encoder.h:36:37: error: unused parameter ‘options’ [-Werror=unused-parameter] struct heif_decoding_options *options) const { ^~~~~~~ In file included from heif_convert.cc:38:0: encoder_jpeg.h: In member function ‘virtual heif_colorspace JpegEncoder::colorspace(bool) const’: encoder_jpeg.h:37:35: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_colorspace colorspace(bool has_alpha) const override { ^~~~~~~~~ encoder_jpeg.h: In member function ‘virtual heif_chroma JpegEncoder::chroma(bool) const’: encoder_jpeg.h:41:27: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_chroma chroma(bool has_alpha) const override { ^~~~~~~~~ In file included from heif_convert.cc:41:0: encoder_png.h: In member function ‘virtual heif_colorspace PngEncoder::colorspace(bool) const’: encoder_png.h:31:35: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_colorspace colorspace(bool has_alpha) const override { ^~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:658: heif_convert-heif_convert.o] Error 1 CXX heif_convert-encoder_jpeg.o In file included from encoder_jpeg.h:31:0, from encoder_jpeg.cc:26: encoder.h: In member function ‘virtual void Encoder::UpdateDecodingOptions(const heif_image_handle*, heif_decoding_options*) const’: encoder.h:35:70: error: unused parameter ‘handle’ [-Werror=unused-parameter] virtual void UpdateDecodingOptions(const struct heif_image_handle* handle, ^~~~~~ encoder.h:36:37: error: unused parameter ‘options’ [-Werror=unused-parameter] struct heif_decoding_options *options) const { ^~~~~~~ In file included from encoder_jpeg.cc:26:0: encoder_jpeg.h: In member function ‘virtual heif_colorspace JpegEncoder::colorspace(bool) const’: encoder_jpeg.h:37:35: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_colorspace colorspace(bool has_alpha) const override { ^~~~~~~~~ encoder_jpeg.h: In member function ‘virtual heif_chroma JpegEncoder::chroma(bool) const’: encoder_jpeg.h:41:27: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_chroma chroma(bool has_alpha) const override { ^~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:672: heif_convert-encoder_jpeg.o] Error 1 CXX heif_convert-encoder_png.o In file included from encoder_png.h:25:0, from encoder_png.cc:26: encoder.h: In member function ‘virtual void Encoder::UpdateDecodingOptions(const heif_image_handle*, heif_decoding_options*) const’: encoder.h:35:70: error: unused parameter ‘handle’ [-Werror=unused-parameter] virtual void UpdateDecodingOptions(const struct heif_image_handle* handle, ^~~~~~ encoder.h:36:37: error: unused parameter ‘options’ [-Werror=unused-parameter] struct heif_decoding_options *options) const { ^~~~~~~ In file included from encoder_png.cc:26:0: encoder_png.h: In member function ‘virtual heif_colorspace PngEncoder::colorspace(bool) const’: encoder_png.h:31:35: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_colorspace colorspace(bool has_alpha) const override { ^~~~~~~~~ encoder_png.cc: In member function ‘virtual bool PngEncoder::Encode(const heif_image_handle*, const heif_image*, const string&)’: encoder_png.cc:40:57: error: unused parameter ‘handle’ [-Werror=unused-parameter] bool PngEncoder::Encode(const struct heif_image_handle* handle, ^~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:686: heif_convert-encoder_png.o] Error 1 make[2]: *** No rule to make target '../libheif/libheif.la', needed by 'heif-convert'. CXX heif_enc-heif_enc.o heif_enc.cc: In function ‘void show_help(const char*)’: heif_enc.cc:66:28: error: unused parameter ‘argv0’ [-Werror=unused-parameter] void show_help(const char* argv0) ^~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:700: heif_enc-heif_enc.o] Error 1 CXX heif_info-heif_info.o heif_info.cc: In function ‘void show_help(const char*)’: heif_info.cc:64:28: error: unused parameter ‘argv0’ [-Werror=unused-parameter] void show_help(const char* argv0) ^~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:714: heif_info-heif_info.o] Error 1 CXX heif_thumbnailer-encoder.o In file included from encoder.cc:30:0: encoder.h: In member function ‘virtual void Encoder::UpdateDecodingOptions(const heif_image_handle*, heif_decoding_options*) const’: encoder.h:35:70: error: unused parameter ‘handle’ [-Werror=unused-parameter] virtual void UpdateDecodingOptions(const struct heif_image_handle* handle, ^~~~~~ encoder.h:36:37: error: unused parameter ‘options’ [-Werror=unused-parameter] struct heif_decoding_options *options) const { ^~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:742: heif_thumbnailer-encoder.o] Error 1 CXX heif_thumbnailer-heif_thumbnailer.o In file included from heif_thumbnailer.cc:36:0: encoder.h: In member function ‘virtual void Encoder::UpdateDecodingOptions(const heif_image_handle*, heif_decoding_options*) const’: encoder.h:35:70: error: unused parameter ‘handle’ [-Werror=unused-parameter] virtual void UpdateDecodingOptions(const struct heif_image_handle* handle, ^~~~~~ encoder.h:36:37: error: unused parameter ‘options’ [-Werror=unused-parameter] struct heif_decoding_options *options) const { ^~~~~~~ In file included from heif_thumbnailer.cc:38:0: encoder_png.h: In member function ‘virtual heif_colorspace PngEncoder::colorspace(bool) const’: encoder_png.h:31:35: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_colorspace colorspace(bool has_alpha) const override { ^~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:756: heif_thumbnailer-heif_thumbnailer.o] Error 1 CXX heif_thumbnailer-encoder_png.o In file included from encoder_png.h:25:0, from encoder_png.cc:26: encoder.h: In member function ‘virtual void Encoder::UpdateDecodingOptions(const heif_image_handle*, heif_decoding_options*) const’: encoder.h:35:70: error: unused parameter ‘handle’ [-Werror=unused-parameter] virtual void UpdateDecodingOptions(const struct heif_image_handle* handle, ^~~~~~ encoder.h:36:37: error: unused parameter ‘options’ [-Werror=unused-parameter] struct heif_decoding_options *options) const { ^~~~~~~ In file included from encoder_png.cc:26:0: encoder_png.h: In member function ‘virtual heif_colorspace PngEncoder::colorspace(bool) const’: encoder_png.h:31:35: error: unused parameter ‘has_alpha’ [-Werror=unused-parameter] heif_colorspace colorspace(bool has_alpha) const override { ^~~~~~~~~ encoder_png.cc: In member function ‘virtual bool PngEncoder::Encode(const heif_image_handle*, const heif_image*, const string&)’: encoder_png.cc:40:57: error: unused parameter ‘handle’ [-Werror=unused-parameter] bool PngEncoder::Encode(const struct heif_image_handle* handle, ^~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:770: heif_thumbnailer-encoder_png.o] Error 1 CXX heif_test-heif_test.o heif_test.cc: In function ‘void show_help(const char*)’: heif_test.cc:49:28: error: unused parameter ‘argv0’ [-Werror=unused-parameter] void show_help(const char* argv0) ^~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:728: heif_test-heif_test.o] Error 1 make[2]: Target 'all' not remade because of errors. make[2]: Leaving directory '/src/gnome/gimp/libheif-1.3.2/examples' Making all in extra make[2]: Entering directory '/src/gnome/gimp/libheif-1.3.2/extra' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/src/gnome/gimp/libheif-1.3.2/extra' Making all in gnome make[2]: Entering directory '/src/gnome/gimp/libheif-1.3.2/gnome' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/src/gnome/gimp/libheif-1.3.2/gnome' Making all in go make[2]: Entering directory '/src/gnome/gimp/libheif-1.3.2/go' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/src/gnome/gimp/libheif-1.3.2/go' Making all in scripts make[2]: Entering directory '/src/gnome/gimp/libheif-1.3.2/scripts' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/src/gnome/gimp/libheif-1.3.2/scripts' make[2]: Entering directory '/src/gnome/gimp/libheif-1.3.2' make[2]: Leaving directory '/src/gnome/gimp/libheif-1.3.2' make[1]: *** [Makefile:507: all-recursive] Error 1 make[1]: Leaving directory '/src/gnome/gimp/libheif-1.3.2' make: *** [Makefile:416: all] Error 2 ```
-Werror failures
https://api.github.com/repos/strukturag/libheif/issues/52/comments
0
2018-07-19T15:42:48Z
2018-07-20T09:02:51Z
https://github.com/strukturag/libheif/issues/52
342,784,851
52
[ "strukturag", "libheif" ]
Thanks to @dlemstra we have a couple of fuzzing result files that triggered crashes / undefined behaviour in the past (e.g. #48). We should add them to the repository and run our tests against them from CI to prevent future regressions.
CI: Run tests against fuzzer crash files.
https://api.github.com/repos/strukturag/libheif/issues/51/comments
0
2018-07-16T09:24:35Z
2018-07-23T15:00:43Z
https://github.com/strukturag/libheif/issues/51
341,445,445
51
[ "strukturag", "libheif" ]
The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9231 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md Stacktrace: ``` WARNING: MemorySanitizer: use-of-uninitialized-value --   | #0 0x15a256e in heif::HeifContext::decode_overlay_image(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&) const libheif/src/heif_context.cc:1186:28   | #1 0x159a257 in heif::HeifContext::decode_image(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>&, heif_decoding_options const*) const libheif/src/heif_context.cc:843:13   | #2 0x15a2b1b in heif::HeifContext::decode_and_paste_tile_image(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const libheif/src/heif_context.cc:1070:15   | #3 0x15b9f4a in __invoke<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int, void> /usr/local/include/c++/v1/type_traits:4421:1   | #4 0x15b9f4a in heif::Error std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int>::__execute<1ul, 2ul, 3ul, 4ul, 5ul>(std::__1::__tuple_indices<1ul, 2ul, 3ul, 4ul, 5ul>) /usr/local/include/c++/v1/future:2330   | #5 0x15b9c08 in std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int>::operator()() /usr/local/include/c++/v1/future:2323:16   | #6 0x15b8e4b in std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::__execute() /usr/local/include/c++/v1/future:985:25   | #7 0x15ba2b7 in __invoke<void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> > *, void> /usr/local/include/c++/v1/type_traits:4421:1   | #8 0x15ba2b7 in __thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> > *, 2> /usr/local/include/c++/v1/thread:342   | #9 0x15ba2b7 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >*> >(void*) /usr/local/include/c++/v1/thread:352 ``` Links: https://github.com/strukturag/libheif/blob/b56e683d05e60a8efcbf6eddbd6f22672b407659/src/heif_context.cc#L1186 Commit: 01fe0a821d5feefb5e8cdefbf2310a07b25b04a8 Testcase file: [clusterfuzz-testcase-minimized-encoder_heic_fuzzer-5171925214035968.zip](https://github.com/strukturag/libheif/files/2194794/clusterfuzz-testcase-minimized-encoder_heic_fuzzer-5171925214035968.zip)
Use-of-uninitialized-value (9231)
https://api.github.com/repos/strukturag/libheif/issues/50/comments
1
2018-07-14T08:43:30Z
2018-07-16T11:12:36Z
https://github.com/strukturag/libheif/issues/50
341,220,956
50
[ "strukturag", "libheif" ]
The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9244 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md Stacktrace: ``` bitstream.cc:301:48: runtime error: signed integer overflow: 16 + 9223372036854775797 cannot be represented in type 'long' --   | #0 0x93c48d in heif::BitstreamRange::wait_for_available_bytes(long) libheif/libheif/bitstream.cc:301:48   | #1 0x943af7 in heif::Box::read(heif::BitstreamRange&, std::__1::shared_ptr<heif::Box>*) libheif/libheif/box.cc:465:23   | #2 0x97df7b in heif::HeifFile::parse_heif_file(heif::BitstreamRange&) libheif/libheif/heif_file.cc:166:19   | #3 0x97db94 in heif::HeifFile::read(std::__1::shared_ptr<heif::StreamReader>) libheif/libheif/heif_file.cc:82:17   | #4 0x97de51 in heif::HeifFile::read_from_memory(void const*, unsigned long, bool) libheif/libheif/heif_file.cc:71:10   | #5 0x91f77c in heif::HeifContext::read_from_memory(void const*, unsigned long, bool) libheif/libheif/heif_context.cc:357:28   | #6 0x90910e in heif_context_read_from_memory libheif/libheif/heif.cc:107:29   | #7 0x7b3f29 in ReadHEICImage imagemagick/coders/heic.c:195:9   | #8 0x544570 in ReadImage imagemagick/MagickCore/constitute.c:500:13   | #9 0x6724cb in ReadStream imagemagick/MagickCore/stream.c:1043:9 ``` Links: https://github.com/strukturag/libheif/blob/01fe0a821d5feefb5e8cdefbf2310a07b25b04a8/libheif/bitstream.cc#L301 Commit: 1fe0a821d5feefb5e8cdefbf2310a07b25b04a8 Testcase file: [clusterfuzz-testcase-minimized-ping_heic_fuzzer-5764869918818304.zip](https://github.com/strukturag/libheif/files/2194792/clusterfuzz-testcase-minimized-ping_heic_fuzzer-5764869918818304.zip)
Integer-overflow (9244)
https://api.github.com/repos/strukturag/libheif/issues/49/comments
1
2018-07-14T08:40:58Z
2018-07-16T09:19:51Z
https://github.com/strukturag/libheif/issues/49
341,220,818
49
[ "strukturag", "libheif" ]
The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9283 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md Stacktrace: ``` SCARINESS: 10 (null-deref) --   | #0 0x7fb55a54dba5 in memcpy-avx-unaligned.S:180 /build/glibc-Cl5G7W/glibc-2.23/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:180   | #1 0x4eba2a in __asan_memcpy _asan_rtl_   | #2 0xdaadca in heif::HeifContext::decode_and_paste_tile_image(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const libheif/libheif/heif_context.cc:1148:7   | #3 0xdbe62a in __invoke<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int, void> /usr/local/include/c++/v1/type_traits:4286:1   | #4 0xdbe62a in heif::Error std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int>::__execute<1ul, 2ul, 3ul, 4ul, 5ul>(std::__1::__tuple_indices<1ul, 2ul, 3ul, 4ul, 5ul>) /usr/local/include/c++/v1/future:2330   | #5 0xdbe3a8 in std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int>::operator()() /usr/local/include/c++/v1/future:2323:16   | #6 0xdbdb8a in std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::__execute() /usr/local/include/c++/v1/future:985:25   | #7 0xdbe884 in __invoke<void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> > *, void> /usr/local/include/c++/v1/type_traits:4286:1   | #8 0xdbe884 in __thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> > *, 2> /usr/local/include/c++/v1/thread:342   | #9 0xdbe884 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >*> >(void*) /usr/local/include/c++/v1/thread:352   | #10 0x7fb55adf36b9 in start_thread   | #11 0x7fb55a50741c in clone /build/glibc-Cl5G7W/glibc-2.23/sysdeps/unix/sysv/linux/x86_64/clone.S:109 ``` Links: https://github.com/strukturag/libheif/blob/01fe0a821d5feefb5e8cdefbf2310a07b25b04a8/libheif/heif_context.cc#L1148 Commit: 01fe0a821d5feefb5e8cdefbf2310a07b25b04a8 Testcase file: [clusterfuzz-testcase-minimized-encoder_heic_fuzzer-4878614100180992.zip](https://github.com/strukturag/libheif/files/2194785/clusterfuzz-testcase-minimized-encoder_heic_fuzzer-4878614100180992.zip)
Null-dereference READ (9283)
https://api.github.com/repos/strukturag/libheif/issues/48/comments
3
2018-07-14T08:21:47Z
2018-07-16T11:16:50Z
https://github.com/strukturag/libheif/issues/48
341,219,828
48
[ "strukturag", "libheif" ]
The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8922 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md Stacktrace: ``` SCARINESS: 10 (signal) --   | #0 0x7f35ed949427 in gsignal /build/glibc-Cl5G7W/glibc-2.23/sysdeps/unix/sysv/linux/raise.c:54   | #1 0x7f35ed94b029 in abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:89   | #2 0x7f35ed941bd6 in __assert_fail_base /build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92   | #3 0x7f35ed941c81 in __assert_fail /build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:101   | #4 0xdc8aef in heif::BitstreamRange::prepare_read(long) libheif/libheif/bitstream.cc:274:5   | #5 0xdce843 in heif::Box::parse(heif::BitstreamRange&) libheif/libheif/box.cc:312:15   | #6 0xdd0d84 in heif::Box::read(heif::BitstreamRange&, std::__1::shared_ptr<heif::Box>*) libheif/libheif/box.cc:476:20   | #7 0xe05df5 in heif::HeifFile::parse_heif_file(heif::BitstreamRange&) libheif/libheif/heif_file.cc:166:19   | #8 0xe05368 in heif::HeifFile::read(std::__1::shared_ptr<heif::StreamReader>) libheif/libheif/heif_file.cc:82:17   | #9 0xe056d8 in heif::HeifFile::read_from_memory(void const*, unsigned long, bool) libheif/libheif/heif_file.cc:71:10   | #10 0xda0796 in heif::HeifContext::read_from_memory(void const*, unsigned long, bool) libheif/libheif/heif_context.cc:357:28   | #11 0xd8812d in heif_context_read_from_memory libheif/libheif/heif.cc:107:29   | #12 0xae518e in ReadHEICImage imagemagick/coders/heic.c:195:9 ``` Links: https://github.com/strukturag/libheif/blob/2706077d0fe4019e4555bebb46e98ff57b850e63/libheif/bitstream.cc#L274 Commit: 2706077d0fe4019e4555bebb46e98ff57b850e63 Testcase file: [clusterfuzz-testcase-minimized-ping_heic_fuzzer-5723660210929664.zip](https://github.com/strukturag/libheif/files/2152793/clusterfuzz-testcase-minimized-ping_heic_fuzzer-5723660210929664.zip)
Abrt (9175)
https://api.github.com/repos/strukturag/libheif/issues/47/comments
1
2018-07-01T12:36:35Z
2018-07-02T10:31:50Z
https://github.com/strukturag/libheif/issues/47
337,287,834
47
[ "strukturag", "libheif" ]
The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8922 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md Stacktrace: ``` ==1==ERROR: AddressSanitizer: ABRT on unknown address 0x000000000001 (pc 0x7f5904896428 bp 0x0000018f7ca0 sp 0x7ffc65bccdd8 T0) --   | SCARINESS: 10 (signal)   | #0 0x7f5904896427 in gsignal /build/glibc-Cl5G7W/glibc-2.23/sysdeps/unix/sysv/linux/raise.c:54   | #1 0x7f5904898029 in abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:89   | #2 0x7f590488ebd6 in __assert_fail_base /build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92   | #3 0x7f590488ec81 in __assert_fail /build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:101   | #4 0xdc0e27 in heif::BitstreamRange::skip_without_advancing_file_pos(long) libheif/libheif/bitstream.cc:303:3   | #5 0xdc323c in heif::BitstreamRange::skip_to_end_of_box() libheif/libheif/bitstream.h:171:27   | #6 0xdc856b in heif::Box::read(heif::BitstreamRange&, std::__1::shared_ptr<heif::Box>*) libheif/libheif/box.cc:481:12   | #7 0xdc9efd in heif::Box::read_children(heif::BitstreamRange&, int) libheif/libheif/box.cc:540:19   | #8 0xdd67bd in heif::Box_iprp::parse(heif::BitstreamRange&) libheif/libheif/box.cc:1476:10   | #9 0xdc8454 in heif::Box::read(heif::BitstreamRange&, std::__1::shared_ptr<heif::Box>*) libheif/libheif/box.cc:476:20   | #10 0xdc9efd in heif::Box::read_children(heif::BitstreamRange&, int) libheif/libheif/box.cc:540:19   | #11 0xdd626c in heif::Box_iinf::parse(heif::BitstreamRange&) libheif/libheif/box.cc:1457:10   | #12 0xdc8454 in heif::Box::read(heif::BitstreamRange&, std::__1::shared_ptr<heif::Box>*) libheif/libheif/box.cc:476:20   | #13 0xdc9efd in heif::Box::read_children(heif::BitstreamRange&, int) libheif/libheif/box.cc:540:19   | #14 0xdcc183 in heif::Box_meta::parse(heif::BitstreamRange&) libheif/libheif/box.cc:714:10   | #15 0xdc8454 in heif::Box::read(heif::BitstreamRange&, std::__1::shared_ptr<heif::Box>*) libheif/libheif/box.cc:476:20   | #16 0xdfd67c in heif::HeifFile::parse_heif_file(heif::BitstreamRange&) libheif/libheif/heif_file.cc:166:19   | #17 0xdfcbf8 in heif::HeifFile::read(std::__1::shared_ptr<heif::StreamReader>) libheif/libheif/heif_file.cc:82:17   | #18 0xdfcf68 in heif::HeifFile::read_from_memory(void const*, unsigned long, bool) libheif/libheif/heif_file.cc:71:10   | #19 0xd9e356 in heif::HeifContext::read_from_memory(void const*, unsigned long, bool) libheif/libheif/heif_context.cc:356:28   | #20 0xd85d0d in heif_context_read_from_memory libheif/libheif/heif.cc:107:29 ``` Links: https://github.com/strukturag/libheif/blob/e20e01294d25499c48f0befb4183ccfde9009d29/libheif/bitstream.cc#L303 Commit: 2706077d0fe4019e4555bebb46e98ff57b850e63 Testcase file: [clusterfuzz-testcase-minimized-encoder_heic_fuzzer-6193003164073984.zip](https://github.com/strukturag/libheif/files/2139079/clusterfuzz-testcase-minimized-encoder_heic_fuzzer-6193003164073984.zip)
Abrt (8922)
https://api.github.com/repos/strukturag/libheif/issues/46/comments
2
2018-06-26T21:45:33Z
2018-07-02T10:32:02Z
https://github.com/strukturag/libheif/issues/46
336,002,410
46
[ "strukturag", "libheif" ]
The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8871 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md Stacktrace: ``` ==1==ERROR: AddressSanitizer: negative-size-param: (size=-320) --   | SCARINESS: 10 (negative-size-param)   | #0 0x4ebcd3 in __asan_memcpy _asan_rtl_   | #1 0xda345d in heif::HeifContext::decode_and_paste_tile_image(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const libheif/libheif/heif_context.cc:1092:7   | #2 0xdb1a0a in __invoke<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int, void> /usr/local/include/c++/v1/type_traits:4286:1   | #3 0xdb1a0a in heif::Error std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int>::__execute<1ul, 2ul, 3ul, 4ul, 5ul>(std::__1::__tuple_indices<1ul, 2ul, 3ul, 4ul, 5ul>) /usr/local/include/c++/v1/future:2330   | #4 0xdb1788 in std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int>::operator()() /usr/local/include/c++/v1/future:2323:16   | #5 0xdb0f6a in std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::__execute() /usr/local/include/c++/v1/future:985:25   | #6 0xdb1c64 in __invoke<void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> > *, void> /usr/local/include/c++/v1/type_traits:4286:1   | #7 0xdb1c64 in __thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, const heif::HeifContext *, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> > *, 2> /usr/local/include/c++/v1/thread:342   | #8 0xdb1c64 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >::*)(), std::__1::__async_assoc_state<heif::Error, std::__1::__async_func<heif::Error (heif::HeifContext::*)(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int) const, heif::HeifContext const*, unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>, int, int> >*> >(void*) /usr/local/include/c++/v1/thread:352   | #9 0x7fb17f2ab6b9 in start_thread   | #10 0x7fb17e9bf41c in clone /build/glibc-Cl5G7W/glibc-2.23/sysdeps/unix/sysv/linux/x86_64/clone.S:109   | 0x7fb17b40d800 is located 0 bytes inside of 262144-byte region [0x7fb17b40d800,0x7fb17b44d800)   | allocated by thread T4 here:   | #0 0x52b3f8 in operator new(unsigned long) _asan_rtl_   | #1 0xdb2b68 in __libcpp_allocate /usr/local/include/c++/v1/new:259:10   | #2 0xdb2b68 in allocate /usr/local/include/c++/v1/memory:1799 ``` Links: https://github.com/strukturag/libheif/blob/647b06f763b030ffde76ca4985f3686084308b09/libheif/heif_context.cc#L1092 Commit: 2706077d0fe4019e4555bebb46e98ff57b850e63 Testcase file: [clusterfuzz-testcase-minimized-encoder_heic_fuzzer-5666980618043392.zip](https://github.com/strukturag/libheif/files/2139072/clusterfuzz-testcase-minimized-encoder_heic_fuzzer-5666980618043392.zip)
Negative-size-param (8871)
https://api.github.com/repos/strukturag/libheif/issues/45/comments
1
2018-06-26T21:40:20Z
2018-07-02T10:32:37Z
https://github.com/strukturag/libheif/issues/45
336,001,013
45
[ "strukturag", "libheif" ]
The @ImageMagick project is using https://github.com/google/oss-fuzz to find bugs in our own library and in libraries that we use. The fuzzer found an issue and we think this is an issue that should be resolved in the library that we use. This issue is posted under the url https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8158 that is not publicly visible yet but added as a link for future reference. Below are the details of the issue that can be reproduced using the following technique: https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md Stacktrace: ``` #0 0x15b8c88 in heif::HeifContext::decode_full_grid_image(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&) const libheif/libheif/heif_context.cc:987:28 --   | #1 0x15b2765 in heif::HeifContext::decode_image(unsigned int, std::__1::shared_ptr<heif::HeifPixelImage>&, heif_decoding_options const*) const libheif/libheif/heif_context.cc:822:13   | #2 0x15b07d2 in heif::HeifContext::Image::decode_image(std::__1::shared_ptr<heif::HeifPixelImage>&, heif_colorspace, heif_chroma, heif_decoding_options const*) const libheif/libheif/heif_context.cc:728:31   | #3 0x158e433 in heif_decode_image libheif/libheif/heif.cc:458:33   | #4 0x109acd2 in ReadHEICImage imagemagick/coders/heic.c:267:9   | #5 0x7d3ce9 in ReadImage imagemagick/MagickCore/constitute.c:500:13   | #6 0x6fd87a in BlobToImage imagemagick/MagickCore/blob.c:473:13   | #7 0x593661 in Magick::Image::read(Magick::Blob const&) imagemagick/Magick++/lib/Image.cpp:4029:12   | #8 0x4a4f5c in LLVMFuzzerTestOneInput imagemagick/Magick++/fuzz/encoder_fuzzer.cc:46:11   | #9 0x4ec19c in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:526:13 ``` Links: https://github.com/strukturag/libheif/blob/2706077d0fe4019e4555bebb46e98ff57b850e63/libheif/heif_context.cc#L987 Commit: 2706077d0fe4019e4555bebb46e98ff57b850e63 Testcase file: [clusterfuzz-testcase-minimized-encoder_heic_fuzzer-5362068734607360.zip](https://github.com/strukturag/libheif/files/2138888/clusterfuzz-testcase-minimized-encoder_heic_fuzzer-5362068734607360.zip)
Use-of-uninitialized-value (8158)
https://api.github.com/repos/strukturag/libheif/issues/44/comments
1
2018-06-26T20:37:26Z
2018-07-02T10:38:28Z
https://github.com/strukturag/libheif/issues/44
335,981,256
44
[ "strukturag", "libheif" ]
Sorry to bother you 。Can I use VS to compile libheif?
How can I use VS to compile libheif?
https://api.github.com/repos/strukturag/libheif/issues/43/comments
3
2018-06-22T03:58:04Z
2018-09-03T08:10:30Z
https://github.com/strukturag/libheif/issues/43
334,736,307
43
[ "strukturag", "libheif" ]
I have install X265 and turn on HAVE_X265 ,but i can't find heif_encoder_x265.h . should I rename x265.h to heif_encoder_x265.h.
How to run heif_enc?
https://api.github.com/repos/strukturag/libheif/issues/42/comments
2
2018-06-21T08:51:13Z
2018-06-21T10:38:58Z
https://github.com/strukturag/libheif/issues/42
334,397,269
42
[ "strukturag", "libheif" ]
please refer to the issue [https://github.com/ImageMagick/ImageMagick/issues/1173](url) when I resize a heic file by imagemagick, I got an error as below: suse11sp1:~/lzz # convert -resize 120x120 20171218_IMG_0449.HEIC 20171218_IMG_0449.jpg terminate called after throwing an instance of 'std::system_error' what(): Resource temporarily unavailable Aborted and I find that the error is related to the heic file size. when the file size is 1.4M, I can resize the file right. but when the file size is 5.5M, I got the errors. `suse11sp1:~/lzz # ll -h total 30M -rw-r--r-- 1 root root 1.4M Dec 18 08:41 20171218_IMG_0446.HEIC -rw-r--r-- 1 root root 5.5M Dec 18 08:41 20171218_IMG_0449.HEIC -rw-r--r-- 1 root root 595K Dec 18 08:41 20171218_IMG_0455.HEIC -rw-r--r-- 1 root root 66K Jun 14 06:01 20171218_IMG_0455.jpg suse11sp1:/lzz # convert -resize 120x120 20171218_IMG_0446.HEIC 20171218_IMG_0446.jpg suse11sp1:/lzz # convert -resize 120x120 20171218_IMG_0449.HEIC 20171218_IMG_0449.jpg terminate called after throwing an instance of 'std::system_error' what(): Resource temporarily unavailable Aborted`
resize heic file exception
https://api.github.com/repos/strukturag/libheif/issues/41/comments
8
2018-06-19T01:02:45Z
2018-06-19T12:23:43Z
https://github.com/strukturag/libheif/issues/41
333,484,444
41
[ "strukturag", "libheif" ]
Do you any plan add to libheif support > 10-16 bit and 4:4:4 chroma subsampling ?
10bit YUV444
https://api.github.com/repos/strukturag/libheif/issues/40/comments
10
2018-06-18T07:20:39Z
2020-07-29T15:41:37Z
https://github.com/strukturag/libheif/issues/40
333,157,758
40
[ "strukturag", "libheif" ]
Building within subdirectory still fails. Steps to reproduce: cd /usr/src/1div0/libheif/Linux/x86-64 ../../configure --prefix=/usr/local --libdir=/usr/local/lib64 make make all-recursive make[1]: Entering directory '/usr/src/1div0/libheif/Linux/x86-64' Making all in libheif make[2]: Entering directory '/usr/src/1div0/libheif/Linux/x86-64/libheif' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/usr/src/1div0/libheif/Linux/x86-64/libheif' Making all in examples make[2]: Entering directory '/usr/src/1div0/libheif/Linux/x86-64/examples' g++ -DHAVE_CONFIG_H -I. -I../../../examples -I.. -I../../.. -I../. -I/usr/include/libpng16 -g -O2 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -MT heif_convert-encoder.o -MD -MP -MF .deps/heif_convert-encoder.Tpo -c -o heif_convert-encoder.o `test -f 'encoder.cc' || echo '../../../examples/'`encoder.cc In file included from ../../../examples/encoder.h:26, from ../../../examples/encoder.cc:30: ../../../libheif/heif.h:31:10: fatal error: heif_version.h: No such file or directory #include "heif_version.h" ^~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [Makefile:643: heif_convert-encoder.o] Error 1 make[2]: Leaving directory '/usr/src/1div0/libheif/Linux/x86-64/examples' make[1]: *** [Makefile:506: all-recursive] Error 1 make[1]: Leaving directory '/usr/src/1div0/libheif/Linux/x86-64' make: *** [Makefile:415: all] Error 2
examples/encoder.cc failed to compile with VPATH
https://api.github.com/repos/strukturag/libheif/issues/39/comments
2
2018-06-15T18:27:29Z
2018-06-16T19:26:04Z
https://github.com/strukturag/libheif/issues/39
332,873,215
39
[ "strukturag", "libheif" ]
To prevent future regressions of problems like the error in #35 we should compile a small C application that is using the header files.
CI: Test compiling with plain C compiler
https://api.github.com/repos/strukturag/libheif/issues/38/comments
3
2018-06-15T08:45:18Z
2018-06-15T08:59:47Z
https://github.com/strukturag/libheif/issues/38
332,692,833
38
[ "strukturag", "libheif" ]
Hi all, Sorry if it's the wrong channel to ask this question. I m using Imagemagick + libheif to convert heif to jpeg. When converting an animated heif, which frame is used to convert the animated image to jpeg ? Is it something you compute, a fix frame number or something else ? Thank you
Converting animated heif to jpeg - Which frame ?
https://api.github.com/repos/strukturag/libheif/issues/37/comments
2
2018-06-15T08:29:39Z
2018-06-15T13:05:13Z
https://github.com/strukturag/libheif/issues/37
332,688,558
37
[ "strukturag", "libheif" ]
PNG -> HEIC lossless -> PNG = does not equal original image.
lossless encoding, not exactly the sources
https://api.github.com/repos/strukturag/libheif/issues/36/comments
1
2018-06-15T07:00:38Z
2018-06-15T08:30:08Z
https://github.com/strukturag/libheif/issues/36
332,666,073
36
[ "strukturag", "libheif" ]
In file included from interface.h:25, from interface.c:28: /usr/local/include/libheif/heif.h:299:3: error: expected specifier-qualifier-list before ‘heif_reader_grow_status’ heif_reader_grow_status (*wait_for_file_size)(int64_t target_size, void* userdata); ^~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [Makefile:422: heif_gimp_plugin-interface.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from interface.h:25, from main.c:30: /usr/local/include/libheif/heif.h:299:3: error: expected specifier-qualifier-list before ‘heif_reader_grow_status’ heif_reader_grow_status (*wait_for_file_size)(int64_t target_size, void* userdata); ^~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [Makefile:436: heif_gimp_plugin-main.o] Error 1 make[2]: Leaving directory '/usr/src/strukturag/heif-gimp-plugin/src'
Compilation failure with recent change in heif.h
https://api.github.com/repos/strukturag/libheif/issues/35/comments
5
2018-06-15T05:49:43Z
2018-06-15T08:44:51Z
https://github.com/strukturag/libheif/issues/35
332,653,591
35
[ "strukturag", "libheif" ]
# patch ``` - writer.write16(c.min_spatial_segmentation_idc & 0x0FFF); + writer.write16((c.min_spatial_segmentation_idc & 0x0FFF) | 0xF000); ``` # reference - https://mpeg.chiariglione.org/standards/mpeg-h/image-file-format/text-isoiec-cd-23008-12-image-file-format - w14148.zip => W14148-HEVC-still-WD.doc ``` aligned(8) class HEVCDecoderConfigurationRecord { (omit) bit(4) reserved = ‘1111’b; unsigned int(12) min_spatial_segmentation_idc; (omit)
wrong padding bits before min_spatial_segmentation_idc
https://api.github.com/repos/strukturag/libheif/issues/31/comments
1
2018-06-06T16:21:19Z
2018-06-11T08:40:33Z
https://github.com/strukturag/libheif/issues/31
329,940,394
31