filestash/server/plugin/plg_thumbnail_c/image_jpeg_freebsd.go
MickaelK ad14ad658a chore (maintenance): image thumbnail
the issue of plg_image_c is its reliance on shared libraries like libraw
which depends on lcms2 and libheif which depends on a whole bunch of
other stuff. That make releasing a fat binary that just work of
Filestash tricky

if someone ever read this, I would gladly get help to integrate the
whole build of those things within CI without prolonging the build time
by 2 hours.
2025-05-22 02:23:28 +10:00

11 lines
287 B
Go

package plg_image_c
// #include "image_jpeg.h"
// #cgo LDFLAGS: -L /usr/local/lib -L /usr/lib -L /lib -l:libjpeg.a
// #cgo CFLAGS: -I /usr/local/include
import "C"
func jpeg(input uintptr, output uintptr, size int) {
C.jpeg_to_jpeg(C.int(input), C.int(output), C.int(size))
return
}