aboutsummaryrefslogtreecommitdiff
path: root/imagegrid/magickconverter.h
blob: 4e82c71a25cf4b0693d79baf4ab3a00d8b1886c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*#include <wand/MagickWand.h>*/
#include <wand/magick-wand.h>

#define BYTESNOMFITXERIMATGE 512
#define BYTESTIPUSFROMAT 4

#define FORMAT_MINIATURA "ppm"
#define PATH_TEMPORAL "/tmp/imgrid_"
#define BYTES_NUM_TEMP 4

#define ThrowWandException(wand) \
{ \
    char \
    *description; \
    \
    ExceptionType \
    severity; \
    \
    description=MagickGetException(wand,&severity); \
    (void) fprintf(stderr,"%s %s %ld %s\n",GetMagickModule(),description); \
    description=(char *) MagickRelinquishMemory(description); \
    exit(-1); \
}

typedef char pathimage[BYTESNOMFITXERIMATGE];

typedef char tipus_format[BYTESTIPUSFROMAT];

void convertir(pathimage pathFitxer, tipus_format f, int W, int H, int posi);