Coverage Report

Created: 2025-06-16 07:00

/work/include/ImageMagick-7/Magick++/Functions.h
Line
Count
Source (jump to first uncovered line)
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
0
    {
50
0
      InitializeMagick( path_ );
51
0
    }
52
53
    // Destructor to de-initialize Magick++
54
    ~MagickPlusPlusGenesis()
55
0
    {
56
0
      TerminateMagick();
57
0
    }
58
59
  private:
60
61
  };
62
}
63
#endif // Magick_Functions_header