Ejemplo n.º 1
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.size_t
	copts := C.MagickQueryFormats(cspattern, &num)
	formats = sizedCStringArrayToStringSlice(copts, num)
	return
}
// 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
}