GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • Image Processing

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — Magick++ Alternatives - C++ Image Processing | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

Magick++

Go binding to ImageMagick's MagickWand C API

gographics logo
godoc.org    Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
6.3
Growing
Activity
2.5
-
Stars 1,876
Watchers 48
Forks 187
Last Commit 6 months ago

Programming language: Go
License: GNU General Public License v3.0 or later
Tags: Image Processing    
Latest version: v3.7.2

Magick++ alternatives and similar libraries

Based on the "Image Processing" category.
Alternatively, view imagick alternatives based on common mentions on social networks and blogs.

  • OpenCV

    10.0 9.9 L1 Magick++ VS OpenCV
    Open Source Computer Vision Library
    opencv logo
  • tesseract-ocr

    9.9 9.3 L1 Magick++ VS tesseract-ocr
    Tesseract Open Source OCR Engine (main repository)
    tesseract-ocr logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • libvips

    9.0 9.4 L3 Magick++ VS libvips
    A fast image processing library with low memory needs.
    libvips logo
  • OpenMVG (open Multiple View Geometry)

    8.6 4.6 Magick++ VS OpenMVG (open Multiple View Geometry)
    open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.
    openMVG logo
  • VTK

    8.0 10.0 L1 Magick++ VS VTK
    Mirror of Visualization Toolkit repository
    Kitware logo
  • OpenImageIO

    7.4 9.7 L1 Magick++ VS OpenImageIO
    Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.
    AcademySoftwareFoundation logo
  • OpenEXR

    7.1 9.6 L1 Magick++ VS OpenEXR
    The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
    AcademySoftwareFoundation logo
  • ITK

    7.0 10.0 L2 Magick++ VS ITK
    Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
    InsightSoftwareConsortium logo
  • CImg

    6.4 9.7 Magick++ VS CImg
    The CImg Library is a small and open-source C++ toolkit for image processing
    GreycLab logo
  • GD

    5.7 9.2 L2 Magick++ VS GD
    GD Graphics Library
    libgd logo
  • Video++

    4.8 0.0 L2 Magick++ VS Video++
    Video++, a C++14 high performance video and image processing library.
    matt-42 logo
  • hiptext

    4.5 0.0 L3 Magick++ VS hiptext
    Turn images into text better than caca/aalib
    jart logo
  • VIGRA

    4.5 6.2 L1 Magick++ VS VIGRA
    a generic C++ library for image analysis
    ukoethe logo
  • SVG++

    4.4 5.4 L3 Magick++ VS SVG++
    C++ SVG library
    svgpp logo
  • GDCM

    4.4 9.2 L1 Magick++ VS GDCM
    Grassroots DICOM read-only mirror. Only for Pull Request. Please report bug at http://sf.net/p/gdcm
    malaterre logo
  • AVIR

    4.0 1.7 Magick++ VS AVIR
    High-quality pro HDR image resizing / scaling C++ library, including a very fast, precise, SIMD Lanczos resizer (header-only C++)
    avaneev logo
  • Boost.GIL

    3.8 8.2 L3 Magick++ VS Boost.GIL
    Boost.GIL - Generic Image Library | Requires C++14 since Boost 1.80
    boostorg logo
  • SAIL

    3.5 9.5 Magick++ VS SAIL
    ⛵The missing fast imaging library for humans (not for machines).
    HappySeaFox logo
  • CxImage

    3.2 0.0 L1 Magick++ VS CxImage
    DISCONTINUED. An image processing and conversion library to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, J2K images. [zlib]
  • FreeImage

    2.5 0.0 L2 Magick++ VS FreeImage
    A custom distribution of FreeImage, with a CMake-based build system. Used by the Athena Game Framework.
    Kanma logo
  • FLOP

    2.0 0.0 Magick++ VS FLOP
    FLOꟼ - An MIT-licensed image viewer equipped with a GPU-accelerated perceptual image diffing algorithm based on ꟻLIP
    jeremyong logo
  • ULIS

    1.8 6.7 Magick++ VS ULIS
    DISCONTINUED. Utility Library for Imaging Systems
    Praxinos logo
  • DCMTK

    - Magick++ VS DCMTK
    DICOM Toolkit.

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of Magick++ or a related project?

Add another 'Image Processing' Library

Popular Comparisons

  • Magick++
    vs
    OpenCV
  • Magick++
    vs
    OpenImageIO
  • Magick++
    vs
    FreeImage
  • Magick++
    vs
    CImg
  • Magick++
    vs
    libvips

README

Go Imagick

GoDoc Travis Build Status

Go Imagick is a Go bind to ImageMagick's MagickWand C API.

We support two compatibility branches:

master (tag v2.x.x): 6.9.1-7 <= ImageMagick <= 6.9.9-35
im-7   (tag v3.x.x): 7.x     <= ImageMagick <= 7.x
legacy (tag v1.x.x): 6.7.x   <= ImageMagick <= 6.8.9-10

They map, respectively, through gopkg.in:

gopkg.in/gographics/imagick.v2/imagick
gopkg.in/gographics/imagick.v3/imagick
gopkg.in/gographics/imagick.v1/imagick

Install

Docker

See [examples/docker](examples/docker)

Mac OS X

MacPorts

sudo port install ImageMagick

Ubuntu / Debian

sudo apt-get install libmagickwand-dev

Windows

Thanks @vprus

  • Install msys2-x86_64
  • In msys shell, do:

    pacman -Syuu
    pacman -S mingw-w64-x86_64-gcc
    pacman -S mingw-w64-x86_64-pkg-config
    pacman -S mingw-w64-x86_64-zlib
    pacman -S mingw-w64-x86_64-imagemagick
    
  • Switch to cmd.exe shell, and do:

    set PATH=<msys64>\mingw64\bin;%PATH%
    set PKG_CONFIG_PATH=<msys64>\mingw64\lib\pkgconfig
    set MAGICK_CODER_MODULE_PATH=<msys64>\mingw64\lib\ImageMagick-7.0.6\modules-Q16HDRI\coders
    go build gopkg.in/gographics/imagick.v3/imagick
    

The default installation path of msys2 is C:\msys64 and you must change <msys64> to your installation path of msys2.

The MAGICK_CODER_MODULE_PATH environment variable tells ImageMagick where to find the decoders. If you still get the NoDecodeDelegateForThisImageFormat error, then make sure the version number and folders are correct.

Common

Check if pkg-config is able to find the right ImageMagick include and libs:

pkg-config --cflags --libs MagickWand

Then go get it:

go get gopkg.in/gographics/imagick.v2/imagick

Per the security update https://groups.google.com/forum/#!topic/golang-announce/X7N1mvntnoU you may need whitelist the -Xpreprocessor flag in your environment.

export CGO_CFLAGS_ALLOW='-Xpreprocessor'

Build tags

If you want to specify CGO_CFLAGS/CGO_LDFLAGS manually at build time, such as for building statically or without pkg-config, you can use the "no_pkgconfig" build tag:

go build -tags no_pkgconfig gopkg.in/gographics/imagick.v2/imagick

Examples

The examples folder is full with usage examples ported from C ones found in here: http://www.imagemagick.org/MagickWand/

Quick and partial example

package main

import "gopkg.in/gographics/imagick.v2/imagick"

func main() {
    imagick.Initialize()
    defer imagick.Terminate()

    mw := imagick.NewMagickWand()

    ...
}

Initialize() and Terminate

As per the ImageMagick C API, Initialize() should be called only once to set up the resources for using ImageMagick. This is typically done in your main() or init() for the entire application or library. Applications can defer a call to Terminate() to tear down the ImageMagick resources.

It is an error to Initialize and Terminate multiple times in specific functions and leads to common problems such as crashes or missing delegates. Do not use Terminate anywhere other than the absolute end of your need for ImageMagick within the program.

Managing memory

Since this is a CGO binding, and the Go GC does not manage memory allocated by the C API, it is then necessary to use the Terminate() and Destroy() methods.

Types which are created via New* constructors (MagickWand, DrawingWand, PixelIterator, PixelWand,...), or created and returned by methods like Clone() are managed by Go GC through the use of finalizers. They are not guaranteed to be cleaned up immediately after the object is not longer in use, but rather at some point later when GC actually executes its finalizers.

If you use struct literals, you should free resources manually:

package main

import "github.com/gographics/imagick/imagick"

func main() {
    imagick.Initialize()
    defer imagick.Terminate()

    mw := imagick.MagickWand{...}
    defer mw.Destroy()

    ...
}

Both methods are compatible if constructor methods used:

package main

import "github.com/gographics/imagick/imagick"

func main() {
    imagick.Initialize()
    defer imagick.Terminate()

    mw := imagick.NewMagickWand()
    defer mw.Destroy()

    ...
}

But you should NOT mix two ways of object creation:

package main

import "github.com/gographics/imagick/imagick"

func main() {
    imagick.Initialize()
    defer imagick.Terminate()

    mw1 := imagick.MagickWand{...}
    defer mw1.Destroy()

    mw2 := imagick.NewMagickWand()

    ...
}

Calling Destroy() on types that are either created via New* or returned from other functions calls forces the cleanup of the item immediately as opposed to later after garbage collection triggers the finalizer for the object. It would be good practice to explicitely call Destroy() to ensure C memory is freed sooner rather than later, depending on how often the GC is triggered.

License

Copyright (c) 2013-2016, The GoGraphics Team All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL HERBERT G. FISCHER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


*Note that all licence references and agreements mentioned in the Magick++ README section above are relevant to that project's source code only.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.