コード例 #1
0
ファイル: magick_wand.go プロジェクト: qwo/abelana-gcp
// Returns any supported image format that match the specified pattern (e.g. "*" for all)
func (mw *MagickWand) QueryFormats(pattern string) (formats []string) {
	cspattern := C.CString(pattern)
	defer C.free(unsafe.Pointer(cspattern))
	var num C.size_t
	copts := C.MagickQueryFormats(cspattern, &num)
	formats = sizedCStringArrayToStringSlice(copts, num)
	return
}
コード例 #2
0
// Returns any supported image format that match the specified pattern (e.g. "*" for all)
func (mw *MagickWand) QueryFormats(pattern string) (formats []string) {
	cspattern := C.CString(pattern)
	defer C.free(unsafe.Pointer(cspattern))
	var num C.ulong
	copts := C.MagickQueryFormats(cspattern, &num)
	defer relinquishMemoryCStringArray(copts)
	formats = sizedCStringArrayToStringSliceLong(copts, num)
	return
}