--- psiconv/trunk/program/psiconv/gen_image.c 1999/12/04 00:40:10 43 +++ psiconv/trunk/program/psiconv/gen_image.c 1999/12/04 00:48:22 44 @@ -39,6 +39,46 @@ } +static int psiconv_gen_image_clipart(FILE *of, psiconv_clipart_f f, + const char *dest) +{ +#if IMAGEMAGICK + psiconv_clipart_section section; + MagickInfo *mi = GetMagickInfo(dest); + ImageInfo image_info; + Image *image = NULL; + Image *last_image = NULL; + Image *this_image; + int i; + + if ((psiconv_list_length(f->sections) < 1) || + ((psiconv_list_length(f->sections)) > 1 && ! (mi->adjoin))) +#endif + return -1; +#if IMAGEMAGICK + for (i = 0; i < psiconv_list_length(f->sections); i++) { + section = psiconv_list_get(f->sections,i); + this_image = get_paint_data_section(section->picture); + if (! image) { + image = this_image; + last_image = image; + } else { + last_image->next=this_image; + this_image->previous=last_image; + this_image->scene=i; + last_image=this_image; + } + } + + GetImageInfo(&image_info); + image_info.file = of; + strcpy(image->magick, dest); + image_info.adjoin=1; + WriteImage(&image_info,image); + return 0; +#endif +} + static int psiconv_gen_image_mbm(FILE *of, psiconv_mbm_f f, const char *dest) { #if IMAGEMAGICK @@ -98,6 +138,8 @@ { if (file->type == psiconv_mbm_file) return psiconv_gen_image_mbm(of,(psiconv_mbm_f) file->file,dest); + if (file->type == psiconv_clipart_file) + return psiconv_gen_image_clipart(of,(psiconv_clipart_f) file->file,dest); else if (file->type == psiconv_sketch_file) { psiconv_gen_image_sketch(of,(psiconv_sketch_f) file->file,dest); return 0;