… | |
… | |
60 | } |
60 | } |
61 | } |
61 | } |
62 | |
62 | |
63 | image = ConstituteImage(sec->xsize,sec->ysize,"RGB",FloatPixel,pixel,&exc); |
63 | image = ConstituteImage(sec->xsize,sec->ysize,"RGB",FloatPixel,pixel,&exc); |
64 | if (! image) { |
64 | if (! image) { |
65 | MagickError(exc.severity,exc.message,exc.qualifier); |
65 | MagickError(exc.severity,exc.reason,exc.description); |
66 | } |
66 | } |
67 | free(pixel); |
67 | free(pixel); |
68 | |
68 | |
69 | return image; |
69 | return image; |
70 | } |
70 | } |
… | |
… | |
74 | static int psiconv_gen_image_clipart(const char *filename, psiconv_clipart_f f, |
74 | static int psiconv_gen_image_clipart(const char *filename, psiconv_clipart_f f, |
75 | const char *dest) |
75 | const char *dest) |
76 | { |
76 | { |
77 | #if IMAGEMAGICK |
77 | #if IMAGEMAGICK |
78 | psiconv_clipart_section section; |
78 | psiconv_clipart_section section; |
79 | MagickInfo *mi = GetMagickInfo(dest); |
79 | MagickInfo *mi; |
80 | ImageInfo *image_info; |
80 | ImageInfo *image_info; |
81 | Image *image = NULL; |
81 | Image *image = NULL; |
82 | Image *last_image = NULL; |
82 | Image *last_image = NULL; |
83 | Image *this_image, *images; |
83 | Image *this_image, *images; |
84 | ExceptionInfo exc; |
84 | ExceptionInfo exc; |
85 | int i; |
85 | int i; |
86 | unsigned int status; |
86 | unsigned int status; |
|
|
87 | |
|
|
88 | GetExceptionInfo(&exc); |
|
|
89 | if (!(mi = GetMagickInfo(dest,&exc))) |
|
|
90 | return -1; |
87 | |
91 | |
88 | if ((psiconv_list_length(f->sections) < 1) || |
92 | if ((psiconv_list_length(f->sections) < 1) || |
89 | ((psiconv_list_length(f->sections)) > 1 && ! (mi->adjoin))) |
93 | ((psiconv_list_length(f->sections)) > 1 && ! (mi->adjoin))) |
90 | #endif |
94 | #endif |
91 | return -1; |
95 | return -1; |
… | |
… | |
100 | this_image->previous=last_image; |
104 | this_image->previous=last_image; |
101 | } |
105 | } |
102 | last_image = this_image; |
106 | last_image = this_image; |
103 | } |
107 | } |
104 | |
108 | |
105 | GetExceptionInfo(&exc); |
|
|
106 | image_info = CloneImageInfo(NULL); |
109 | image_info = CloneImageInfo(NULL); |
107 | set_filename(image->filename,dest,filename); |
110 | set_filename(image->filename,dest,filename); |
108 | if (image->next) |
111 | if (image->next) |
109 | images = CoalesceImages(image,&exc); |
112 | images = CoalesceImages(image,&exc); |
110 | else |
113 | else |
… | |
… | |
127 | const char *dest) |
130 | const char *dest) |
128 | { |
131 | { |
129 | |
132 | |
130 | #if IMAGEMAGICK |
133 | #if IMAGEMAGICK |
131 | psiconv_paint_data_section section; |
134 | psiconv_paint_data_section section; |
132 | MagickInfo *mi = GetMagickInfo(dest); |
135 | MagickInfo *mi; |
133 | ImageInfo *image_info; |
136 | ImageInfo *image_info; |
134 | Image *image = NULL; |
137 | Image *image = NULL; |
135 | Image *last_image = NULL; |
138 | Image *last_image = NULL; |
136 | Image *this_image, *images; |
139 | Image *this_image, *images; |
137 | ExceptionInfo exc; |
140 | ExceptionInfo exc; |
138 | int i; |
141 | int i; |
139 | unsigned int status; |
142 | unsigned int status; |
|
|
143 | |
|
|
144 | GetExceptionInfo(&exc); |
|
|
145 | if (!(mi = GetMagickInfo(dest,&exc))) |
|
|
146 | return -1; |
140 | |
147 | |
141 | if ((psiconv_list_length(f->sections) < 1) || |
148 | if ((psiconv_list_length(f->sections) < 1) || |
142 | ((psiconv_list_length(f->sections)) > 1 && ! (mi->adjoin))) |
149 | ((psiconv_list_length(f->sections)) > 1 && ! (mi->adjoin))) |
143 | #endif |
150 | #endif |
144 | return -1; |
151 | return -1; |
… | |
… | |
154 | this_image->previous=last_image; |
161 | this_image->previous=last_image; |
155 | } |
162 | } |
156 | last_image = this_image; |
163 | last_image = this_image; |
157 | } |
164 | } |
158 | |
165 | |
159 | GetExceptionInfo(&exc); |
|
|
160 | image_info = CloneImageInfo(NULL); |
166 | image_info = CloneImageInfo(NULL); |
161 | set_filename(image->filename,dest,filename); |
167 | set_filename(image->filename,dest,filename); |
162 | if (image->next) |
168 | if (image->next) |
163 | images = CoalesceImages(image,&exc); |
169 | images = CoalesceImages(image,&exc); |
164 | else |
170 | else |