[ANN] Go IMagick - ImageMagick cgo binding

734 views
Skip to first unread message

Herbert Fischer

unread,
May 5, 2013, 11:56:11 PM5/5/13
to golang-nuts
Greetings,

I'm happy to announce my ImageMagick bindings for Go. 

The entire MagickWand C API was mapped and probably is sufficient to do a lot. Some things are still missing or partially mapped, mostly things related to the MagickCore API.

I still consider it alpha work and I'm accepting contributions. 

Details about it may be found in the following link:


I hope you find it useful.

Herbert G. Fischer

Job van der Zwan

unread,
May 6, 2013, 6:22:09 AM5/6/13
to golan...@googlegroups.com
I ever am in a "I need ImageMagick for this"-situation (past experience indicates this WILL happen) I'll be very happy this exists. Thank you!

(Will you also take a stab at GraphicsMagick[1]?)

Herbert Fischer

unread,
May 6, 2013, 7:46:18 AM5/6/13
to Job van der Zwan, golang-nuts
Why not? 

I only choose ImageMagick because some people advert it being more feature complete (has support to CMYKA) and also thread-safe [1], and since this was my first Go project using cgo, I could not tell if this is really important for Go (e.g. goroutines). Another thing I've found out is that GraphicsMagick is faster by default because it uses RAM as temporary space, and ImageMagick uses temporary files in disk and this can easily be changed [1]. Other argues that GM is faster because is a slimmed down version of IM [2]. It's also is really hard to choose but I kept IM because I really needed CMYKA support.

I would first try to make through some way to pre-select the prefered library in the same project, but I think this is not possible. I'm also looking for a solution of to make easier to use this binding with different versions of ImageMagick. Some people certainly will have some trouble building this binding in Ubuntu 12.10 (I had) since it's ImageMagick version is too old (6.7.7 against 6.8.5), misses some functions used in the binding and there is even some bug that someone swapped some API function names.

After writing this bindings In about 6 days, I'm considering porting IM or GM entirely to Go since it's relatively easy to port C to Go and we could easily benefit of Go's concurrency features and memory management.



Herbert Fischer

unread,
May 6, 2013, 2:26:17 PM5/6/13
to Job van der Zwan, golang-nuts
I've just updated the Go Imagick with a go1 branch (the one "go get"able - for API stability) and lowered the minimum required ImageMagick version to 6.7.7 (the one present in Ubuntu 12.10 and Debian 7.0).

I've also updated and fixed some things in the README.

anjan....@gmail.com

unread,
Oct 23, 2013, 4:43:16 AM10/23/13
to golan...@googlegroups.com, Job van der Zwan
"After writing this bindings In about 6 days, I'm considering porting IM or GM entirely to Go since it's relatively easy to port C to Go and we could easily benefit of Go's concurrency features and memory management."
+1
Did you make any progress on this ? Is it still in the plan ?

Thank you,

Herbert Fischer

unread,
Oct 26, 2013, 5:48:08 AM10/26/13
to anjan....@gmail.com, Job van der Zwan, golang-nuts

Not alone. It's an herculean job.

I barely had time to use my own cgo bindings and any other project in Go recently.

I've heard that folks are using the binding, including the guy from goingo.net, so I think is doing well.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages