… | |
… | |
44 | strcpy(image->magick, dest); |
44 | strcpy(image->magick, dest); |
45 | WriteImage(&image_info,image); |
45 | WriteImage(&image_info,image); |
46 | #endif |
46 | #endif |
47 | } |
47 | } |
48 | |
48 | |
49 | static void psiconv_gen_image_mbm(FILE *of, psiconv_mbm_f f, const char *dest) |
49 | static int psiconv_gen_image_mbm(FILE *of, psiconv_mbm_f f, const char *dest) |
50 | { |
50 | { |
51 | psiconv_paint_data_section section; |
51 | psiconv_paint_data_section section; |
|
|
52 | #if IMAGEMAGICK |
|
|
53 | MagickInfo *mi = GetMagickInfo(dest); |
|
|
54 | #endif |
52 | if (psiconv_list_length(f->sections) >= 1) { |
55 | if (psiconv_list_length(f->sections) == 1) { |
53 | section = psiconv_list_get(f->sections,0); |
56 | section = psiconv_list_get(f->sections,0); |
54 | gen_paint_data_section(of,section,dest); |
57 | gen_paint_data_section(of,section,dest); |
55 | } |
58 | return 0; |
|
|
59 | #if IMAGEMAGICK |
|
|
60 | } else if ((mi->adjoin) && (psiconv_list_length(f->sections) >= 1)) { |
|
|
61 | /* Not yet supported... */ |
|
|
62 | return -1; |
|
|
63 | #endif |
|
|
64 | } else |
|
|
65 | return -1; |
56 | } |
66 | } |
57 | |
67 | |
58 | static void psiconv_gen_image_sketch(FILE *of, psiconv_sketch_f f, |
68 | static void psiconv_gen_image_sketch(FILE *of, psiconv_sketch_f f, |
59 | const char * dest) |
69 | const char * dest) |
60 | { |
70 | { |
… | |
… | |
62 | } |
72 | } |
63 | |
73 | |
64 | static int psiconv_gen_image(FILE * of, const psiconv_file file, |
74 | static int psiconv_gen_image(FILE * of, const psiconv_file file, |
65 | const char *dest) |
75 | const char *dest) |
66 | { |
76 | { |
67 | if (file->type == psiconv_mbm_file) { |
77 | if (file->type == psiconv_mbm_file) |
68 | psiconv_gen_image_mbm(of,(psiconv_mbm_f) file->file,dest); |
78 | return psiconv_gen_image_mbm(of,(psiconv_mbm_f) file->file,dest); |
69 | return 0; |
|
|
70 | } else if (file->type == psiconv_sketch_file) { |
79 | else if (file->type == psiconv_sketch_file) { |
71 | psiconv_gen_image_sketch(of,(psiconv_sketch_f) file->file,dest); |
80 | psiconv_gen_image_sketch(of,(psiconv_sketch_f) file->file,dest); |
72 | return 0; |
81 | return 0; |
73 | } else |
82 | } else |
74 | return -1; |
83 | return -1; |
75 | } |
84 | } |