magick
magick copied to clipboard
Added Colorspace support
I've added Colorspace
(SetImageColorspace
in MagicCore API) method to allow converting colorspaces.
Differents between -set colorspace RGB
and -colorspace RGB
(SetProperty("colorspace", "RGB")
and Colorspace(RGB)
) there
When I tried to build it (and when go get
ing) I have this warnings: #18
Also, I'm unable to run tests:
# magick
./magick.go:98:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'Image *' (aka 'struct _Image *') [-Wnon-literal-null-conversion]
./magick.go:103:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'Image *' (aka 'struct _Image *') [-Wnon-literal-null-conversion]
./magick.go:115:14: warning: expression which evaluates to zero treated as a null pointer constant of type 'Image *' (aka 'struct _Image *') [-Wnon-literal-null-conversion]
./magick.go:118:14: warning: expression which evaluates to zero treated as a null pointer constant of type 'Image *' (aka 'struct _Image *') [-Wnon-literal-null-conversion]
./magick.go:130:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'Image *' (aka 'struct _Image *') [-Wnon-literal-null-conversion]
./magick.go:139:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'Image *' (aka 'struct _Image *') [-Wnon-literal-null-conversion]
magick.test: Not a JPEG file: starts with 0x62 0x6c `image.jpg' @ error/jpeg.c/JPEGErrorHandler/322.
--- FAIL: TestPDFFromBlob (0.10s)
assert.go:15: /Users/admin/gopath/src/magick/magick_test.go:92
assert.go:36: ! Failure
Assertion failed: (image != (Image *) NULL), function SetGeometry, file magick/geometry.c, line 1534.
SIGABRT: abort
PC=0x7fff928d4002 m=0
signal arrived during cgo execution
goroutine 20 [syscall, locked to thread]:
runtime.cgocall(0x4002bc0, 0xc820038db0, 0x0)
/usr/local/Cellar/go/1.5/libexec/src/runtime/cgocall.go:120 +0x11b fp=0xc820038d80 sp=0xc820038d50
magick._Cfunc_ParseRegionGeometry(0x0, 0x46282e0, 0xc820210080, 0x4629dc0, 0xc800000000)
??:0 +0x39 fp=0xc820038db0 sp=0xc820038d80
magick.(*MagickImage).ParseGeometryToRectangleInfo(0xc8201f2120, 0x41b2c60, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/admin/gopath/src/magick/magick.go:361 +0x116 fp=0xc820038df8 sp=0xc820038db0
magick.(*MagickImage).Resize(0xc8201f2120, 0x41b2c60, 0x8, 0x0, 0x0)
/Users/admin/gopath/src/magick/magick.go:392 +0xa2 fp=0xc820038e88 sp=0xc820038df8
magick.TestPDFResize(0xc82020e120)
/Users/admin/gopath/src/magick/magick_test.go:148 +0x100 fp=0xc820038f68 sp=0xc820038e88
testing.tRunner(0xc82020e120, 0x4282630)
/usr/local/Cellar/go/1.5/libexec/src/testing/testing.go:456 +0x98 fp=0xc820038fa0 sp=0xc820038f68
runtime.goexit()
/usr/local/Cellar/go/1.5/libexec/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc820038fa8 sp=0xc820038fa0
created by testing.RunTests
/usr/local/Cellar/go/1.5/libexec/src/testing/testing.go:561 +0x86d
goroutine 1 [chan receive]:
testing.RunTests(0x41fcd00, 0x4282540, 0x18, 0x18, 0x402f700)
/usr/local/Cellar/go/1.5/libexec/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc82005def8, 0xc820000180)
/usr/local/Cellar/go/1.5/libexec/src/testing/testing.go:494 +0x70
main.main()
magick/_test/_testmain.go:100 +0x116
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.5/libexec/src/runtime/asm_amd64.s:1696 +0x1
rax 0x0
rbx 0x6
rcx 0x7fff5fbff678
rdx 0x0
rdi 0x307
rsi 0x6
rbp 0x7fff5fbff6a0
rsp 0x7fff5fbff678
r8 0x0
r9 0x5fe
r10 0x8000000
r11 0x206
r12 0x4453ac8
r13 0x45ff000
r14 0x7fff7713f000
r15 0x4449d48
rip 0x7fff928d4002
rflags 0x206
cs 0x7
fs 0x0
gs 0x0
exit status 2
FAIL magick 0.556s