mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
Co-authored-by: Yonas <yonas@mail.lan>
This commit is contained in:
parent
24fb6bf9e1
commit
54468eb2c5
8 changed files with 84 additions and 0 deletions
11
server/plugin/plg_image_c/image_heif_freebsd.go
Normal file
11
server/plugin/plg_image_c/image_heif_freebsd.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package plg_image_c
|
||||
|
||||
// #include "image_heif.h"
|
||||
// #cgo LDFLAGS: -L /usr/local/lib -L /usr/lib -L /lib -lheif
|
||||
// #cgo CFLAGS: -I /usr/local/include
|
||||
import "C"
|
||||
|
||||
func heif(input uintptr, output uintptr, size int) {
|
||||
C.heif_to_jpeg(C.int(input), C.int(output), C.int(size))
|
||||
return
|
||||
}
|
||||
10
server/plugin/plg_image_c/image_heif_linux.go
Normal file
10
server/plugin/plg_image_c/image_heif_linux.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package plg_image_c
|
||||
|
||||
// #include "image_heif.h"
|
||||
// #cgo LDFLAGS: -lheif
|
||||
import "C"
|
||||
|
||||
func heif(input uintptr, output uintptr, size int) {
|
||||
C.heif_to_jpeg(C.int(input), C.int(output), C.int(size))
|
||||
return
|
||||
}
|
||||
11
server/plugin/plg_image_c/image_jpeg_freebsd.go
Normal file
11
server/plugin/plg_image_c/image_jpeg_freebsd.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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
|
||||
}
|
||||
10
server/plugin/plg_image_c/image_jpeg_linux.go
Normal file
10
server/plugin/plg_image_c/image_jpeg_linux.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package plg_image_c
|
||||
|
||||
// #include "image_jpeg.h"
|
||||
// #cgo LDFLAGS: -l:libjpeg.a
|
||||
import "C"
|
||||
|
||||
func jpeg(input uintptr, output uintptr, size int) {
|
||||
C.jpeg_to_jpeg(C.int(input), C.int(output), C.int(size))
|
||||
return
|
||||
}
|
||||
11
server/plugin/plg_image_c/image_png_freebsd.go
Normal file
11
server/plugin/plg_image_c/image_png_freebsd.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package plg_image_c
|
||||
|
||||
// #include "image_png.h"
|
||||
// #cgo LDFLAGS: -L /usr/local/lib -L /usr/lib -L /lib -l:libsharpyuv.a -l:libpng.a -l:libz.a -l:libwebp.a -l:libpthread.a -fopenmp
|
||||
// #cgo CFLAGS: -I /usr/local/include
|
||||
import "C"
|
||||
|
||||
func png(input uintptr, output uintptr, size int) {
|
||||
C.png_to_webp(C.int(input), C.int(output), C.int(size))
|
||||
return
|
||||
}
|
||||
10
server/plugin/plg_image_c/image_png_linux.go
Normal file
10
server/plugin/plg_image_c/image_png_linux.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package plg_image_c
|
||||
|
||||
// #include "image_png.h"
|
||||
// #cgo LDFLAGS: -l:libpng.a -l:libz.a -l:libwebp.a -fopenmp
|
||||
import "C"
|
||||
|
||||
func png(input uintptr, output uintptr, size int) {
|
||||
C.png_to_webp(C.int(input), C.int(output), C.int(size))
|
||||
return
|
||||
}
|
||||
11
server/plugin/plg_image_c/image_raw_freebsd.go
Normal file
11
server/plugin/plg_image_c/image_raw_freebsd.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package plg_image_c
|
||||
|
||||
// #include "image_raw.h"
|
||||
// #cgo LDFLAGS: -L /usr/local/lib -L /usr/lib -L /lib -l:libyuv.a -l:libjpeg.a -l:libraw.a -fopenmp -l:libc++.a -llcms2 -lm
|
||||
// #cgo CFLAGS: -I /usr/local/include
|
||||
import "C"
|
||||
|
||||
func raw(input uintptr, output uintptr, size int) {
|
||||
C.raw_to_jpeg(C.int(input), C.int(output), C.int(size))
|
||||
return
|
||||
}
|
||||
10
server/plugin/plg_image_c/image_raw_linux.go
Normal file
10
server/plugin/plg_image_c/image_raw_linux.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package plg_image_c
|
||||
|
||||
// #include "image_raw.h"
|
||||
// #cgo LDFLAGS: -l:libjpeg.a -l:libraw.a -fopenmp -l:libstdc++.a -llcms2 -lm
|
||||
import "C"
|
||||
|
||||
func raw(input uintptr, output uintptr, size int) {
|
||||
C.raw_to_jpeg(C.int(input), C.int(output), C.int(size))
|
||||
return
|
||||
}
|
||||
Loading…
Reference in a new issue