Magick++  7.1.2-29
Convert, Edit, Or Compose Bitmap Images
Functions.h
1 // This may look like C code, but it is really -*- C++ -*-
2 //
3 // Copyright Bob Friesenhahn, 1999, 2000, 2001, 2003
4 //
5 // Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
6 // dedicated to making software imaging solutions freely available.
7 //
8 // Simple C++ function wrappers for often used or otherwise
9 // inconvenient ImageMagick equivalents
10 //
11 
12 #if !defined(Magick_Functions_header)
13 #define Magick_Functions_header
14 
15 #include "Magick++/Include.h"
16 #include <string>
17 
18 namespace Magick
19 {
20  // Clone C++ string as allocated C string, de-allocating any existing string
21  MagickPPExport void CloneString(char **destination_,
22  const std::string &source_);
23 
24  // Disable OpenCL acceleration (only works when build with OpenCL support)
25  MagickPPExport void DisableOpenCL(void);
26 
27  // Enable OpenCL acceleration (only works when build with OpenCL support)
28  MagickPPExport bool EnableOpenCL(void);
29 
30  // C library initialization routine
31  MagickPPExport void InitializeMagick(const char *path_);
32 
33  // Seed a new sequence of pseudo-random numbers
34  MagickPPExport void SetRandomSeed(const unsigned long seed);
35 
36  // Set the ImageMagick security policy.
37  MagickPPExport bool SetSecurityPolicy(const std::string &policy_);
38 
39  // C library de-initialize routine
40  MagickPPExport void TerminateMagick();
41 
42  // Constructor to initialize the Magick++ environment
43  class MagickPPExport MagickPlusPlusGenesis
44  {
45  public:
46 
47  // Constructor to initialize Magick++
48  MagickPlusPlusGenesis(const char *path_)
49  {
50  InitializeMagick( path_ );
51  }
52 
53  // Destructor to de-initialize Magick++
55  {
56  TerminateMagick();
57  }
58 
59  private:
60 
61  };
62 }
63 #endif // Magick_Functions_header