/[public]/psiconv/trunk/program/psiconv/gen_image.c
ViewVC logotype

Diff of /psiconv/trunk/program/psiconv/gen_image.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 192 Revision 249
1/* 1/*
2 * gen_image.c - Part of psiconv, a PSION 5 file formats converter 2 * gen_image.c - Part of psiconv, a PSION 5 file formats converter
3 * Copyright (c) 1999 Frodo Looijaard <frodol@dds.nl> 3 * Copyright (c) 1999-2004 Frodo Looijaard <frodol@dds.nl>
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or 7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
31 31
32#ifdef DMALLOC 32#ifdef DMALLOC
33#include "dmalloc.h" 33#include "dmalloc.h"
34#endif 34#endif
35 35
36#ifdef IMAGEMAGICK
36static Image *get_paint_data_section(psiconv_paint_data_section sec); 37static Image *get_paint_data_section(psiconv_paint_data_section sec);
37static void image_to_list(psiconv_list list,Image *image,const char *dest); 38static void image_to_list(psiconv_list list,Image *image,const char *dest);
38static void gen_image_list(const psiconv_config config,psiconv_list list, 39static void gen_image_list(const psiconv_config config,psiconv_list list,
39 const psiconv_list sections, const char *dest); 40 const psiconv_list sections, const char *dest);
40static void gen_clipart(const psiconv_config config,psiconv_list list, 41static void gen_clipart(const psiconv_config config,psiconv_list list,
41 const psiconv_clipart_f f, const char *dest); 42 const psiconv_clipart_f f, const char *dest);
42static void gen_mbm(const psiconv_config config,psiconv_list list, 43static void gen_mbm(const psiconv_config config,psiconv_list list,
43 const psiconv_mbm_f f, const char *dest); 44 const psiconv_mbm_f f, const char *dest);
44static void gen_sketch(const psiconv_config config,psiconv_list list, 45static void gen_sketch(const psiconv_config config,psiconv_list list,
45 const psiconv_sketch_f f, const char *dest); 46 const psiconv_sketch_f f, const char *dest);
47static int gen_image(psiconv_config config, psiconv_list list,
48 const psiconv_file file, const char *dest,
49 const encoding encoding_type);
46 50
47/* This is ridiculously simple using ImageMagick. Without it, it would 51/* This is ridiculously simple using ImageMagick. Without it, it would
48 be quite somewhat harder - it will be left for later on. 52 be quite somewhat harder - it will be left for later on.
49 Note that we ignore any errors. Dangerous... */ 53 Note that we ignore any errors. Dangerous... */
50 54
207 image_to_list(list,image,dest); 211 image_to_list(list,image,dest);
208 DestroyImage(image); 212 DestroyImage(image);
209} 213}
210 214
211 215
212static int gen_image(psiconv_config config, psiconv_list list, 216int gen_image(psiconv_config config, psiconv_list list,
213 const psiconv_file file, const char *dest, 217 const psiconv_file file, const char *dest,
214 const encoding encoding_type) 218 const encoding encoding_type)
215{ 219{
216 if (file->type == psiconv_mbm_file) 220 if (file->type == psiconv_mbm_file)
217 gen_mbm(config,list,(psiconv_mbm_f) file->file,dest); 221 gen_mbm(config,list,(psiconv_mbm_f) file->file,dest);
223 gen_sketch(config, list,(psiconv_sketch_f) file->file,dest); 227 gen_sketch(config, list,(psiconv_sketch_f) file->file,dest);
224 } else 228 } else
225 return -1; 229 return -1;
226 return 0; 230 return 0;
227} 231}
232
233#endif
228 234
229void init_image(void) 235void init_image(void)
230{ 236{
231 struct fileformat_s ff; 237 struct fileformat_s ff;
232#if IMAGEMAGICK 238#if IMAGEMAGICK

Legend:
Removed from v.192  
changed lines
  Added in v.249

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26