Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vipsthumbnail not working for heic, how to debug? #1964

Closed
fuji246 opened this issue Jan 16, 2021 · 6 comments
Closed

vipsthumbnail not working for heic, how to debug? #1964

fuji246 opened this issue Jan 16, 2021 · 6 comments
Labels

Comments

@fuji246
Copy link

fuji246 commented Jan 16, 2021

I've compiled libvips for arm64, and having problem using vipsthumbnail generating thumbnail for heic file, it should compiled with heif support, but not sure why it doesn't recognize heic file.


pi@raspberrypi:~/Downloads/libvips $ /usr/local/bin/vipsthumbnail /media/lomorage/bob/Photos/master/2018/03/30/20180330_4.heic
/usr/local/bin/vipsthumbnail: unable to thumbnail /media/lomorage/bob/Photos/master/2018/03/30/20180330_4.heic
VipsForeignLoad: "/media/lomorage/bob/Photos/master/2018/03/30/20180330_4.heic" is not a known file format


pi@raspberrypi:~/Downloads/libvips $ /usr/local/bin/vipsthumbnail  --vips-config  
native win32: no
native OS X: no
open files in binary mode: no
enable debug: no
enable deprecated library components: yes
enable docs with gtkdoc: no
gobject introspection: no
enable radiance support: yes
enable analyze support: yes
enable PPM support: yes
use fftw3 for FFT: no
Magick package: none
Magick API version: none
load with libMagick: no
save with libMagick: no
accelerate loops with orc: no
ICC profile support with lcms: no
file import with niftiio: no
file import with libheif: yes
file import with OpenEXR: no
file import with OpenSlide: no
file import with matio: no
PDF import with PDFium: no
PDF import with poppler-glib: no
SVG import with librsvg-2.0: no
zlib: yes
file import with cfitsio: no
file import/export with libwebp: yes
text rendering with pangoft2: no
file import/export with libspng: no
file import/export with libpng: yes (pkg-config libpng >= 1.2.9)
support 8bpp PNG quantisation: no
file import/export with libtiff: yes (pkg-config libtiff-4)
file import/export with giflib: no
file import/export with libjpeg: yes (pkg-config)
image pyramid export: no
use libexif to load/save JPEG metadata: no

pi@raspberrypi:~/Downloads/libvips $ ldd /usr/local/bin/vipsthumbnail
	linux-vdso.so.1 (0x0000007f8c5d8000)
	libvips.so.42 => /usr/local/lib/libvips.so.42 (0x0000007f8c0c7000)
	libheif.so.1 => /usr/local/lib/libheif.so.1 (0x0000007f8c05d000)
	libpng16.so.16 => /usr/lib/aarch64-linux-gnu/libpng16.so.16 (0x0000007f8c018000)
	libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007f8bfeb000)
	libtiff.so.5 => /usr/lib/aarch64-linux-gnu/libtiff.so.5 (0x0000007f8bf60000)
	libjpeg.so.62 => /usr/lib/aarch64-linux-gnu/libjpeg.so.62 (0x0000007f8bf10000)
	libgmodule-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgmodule-2.0.so.0 (0x0000007f8befc000)
	libgio-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0 (0x0000007f8bd1c000)
	libgobject-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0 (0x0000007f8bcb5000)
	libglib-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000007f8bb82000)
	libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000007f8bb43000)
	libwebpmux.so.3 => /usr/lib/aarch64-linux-gnu/libwebpmux.so.3 (0x0000007f8bb2a000)
	libwebpdemux.so.2 => /usr/lib/aarch64-linux-gnu/libwebpdemux.so.2 (0x0000007f8bb16000)
	libwebp.so.6 => /usr/lib/aarch64-linux-gnu/libwebp.so.6 (0x0000007f8babc000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f8b9ff000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f8b9d0000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f8b85e000)
	libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f8b6d3000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f8b6af000)
	libde265.so.0 => /usr/lib/aarch64-linux-gnu/libde265.so.0 (0x0000007f8b611000)
	libx265.so.165 => /usr/lib/aarch64-linux-gnu/libx265.so.165 (0x0000007f8b365000)
	/lib/ld-linux-aarch64.so.1 (0x0000007f8c5aa000)
	libzstd.so.1 => /usr/lib/aarch64-linux-gnu/libzstd.so.1 (0x0000007f8b2ce000)
	liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000007f8b299000)
	libjbig.so.0 => /usr/lib/aarch64-linux-gnu/libjbig.so.0 (0x0000007f8b27c000)
	libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f8b268000)
	libmount.so.1 => /lib/aarch64-linux-gnu/libmount.so.1 (0x0000007f8b1f8000)
	libselinux.so.1 => /lib/aarch64-linux-gnu/libselinux.so.1 (0x0000007f8b1c4000)
	libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000007f8b19e000)
	libffi.so.6 => /usr/lib/aarch64-linux-gnu/libffi.so.6 (0x0000007f8b186000)
	libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000007f8b113000)
	libnuma.so.1 => /usr/lib/aarch64-linux-gnu/libnuma.so.1 (0x0000007f8b0f3000)
	libblkid.so.1 => /lib/aarch64-linux-gnu/libblkid.so.1 (0x0000007f8b08e000)
	librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007f8b076000)
	libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000007f8b05c000)
@jcupitt
Copy link
Member

jcupitt commented Jan 16, 2021

Hello @fuji246,

It's a two-step process: libheif needs to be compiled for HEIC support (it can also support AVIF), then libvips needs to be compiled for libheif support.

It looks like you have libvips built with libheif, so I'd guess your libheif is missing HEIC. I see:

$ pkg-config libheif --print-variables
builtin_avif_decoder
builtin_avif_encoder
builtin_h265_decoder
builtin_h265_encoder
exec_prefix
includedir
libdir
pcfiledir
prefix

jcupitt added a commit that referenced this issue Jan 16, 2021
@jcupitt
Copy link
Member

jcupitt commented Jan 16, 2021

I added a note about this to the README.

@fuji246
Copy link
Author

fuji246 commented Jan 16, 2021

Thank you for your quick response.

I've checked my build, seems it's the same with the output above

pi@raspberrypi:~/Downloads $ pkg-config libheif --print-variables
builtin_avif_decoder
builtin_avif_encoder
builtin_h265_decoder
builtin_h265_encoder
exec_prefix
includedir
libdir
pcfiledir
prefix

@jcupitt
Copy link
Member

jcupitt commented Jan 16, 2021

Huh curious. Could you share the file that's failing to load?

This one works for me:

http://www.rollthepotato.net/~john/image1.heic

@fuji246
Copy link
Author

fuji246 commented Jan 16, 2021

I actually tried the same file on mac and it works.
20180330_3.heic.zip

@fuji246
Copy link
Author

fuji246 commented Jan 16, 2021

I tried to gdb and set breakpoints below, but I'm not familiar those gobjects, not sure where is the code that dynamic build the map to load the heic class.

Breakpoint 4, vips_thumbnail_file_get_info (thumbnail=0x5555641ff0) at thumbnail.c:1023
1023		if( !(thumbnail->loader = vips_foreign_find_load( file->filename )) ||

@jcupitt jcupitt closed this as completed Feb 17, 2021
@libvips libvips locked and limited conversation to collaborators Feb 17, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants