$(C) pdf2swf.c -o $@
pdf2pdf.$(O): pdf2pdf.c
$(C) pdf2pdf.c -o $@
+gfx2gfx.$(O): gfx2gfx.c
+ $(C) gfx2gfx.c -o $@
gif2swf.$(O): gif2swf.c
$(C) gif2swf.c -o $@
swfcombine.$(O): swfcombine.c
$(STRIP) $@
PDF2SWF_OBJ=../lib/libgfxswf$(A) ../lib/librfxswf$(A) ../lib/libpdf$(A) ../lib/libgfx$(A) ../lib/libbase$(A)
+OCR_OBJ=../lib/libocr$(A)
+
pdf2swf$(E): pdf2swf.$(O) $(PDF2SWF_OBJ)
$(LL) pdf2swf.$(O) -o $@ $(PDF2SWF_OBJ) $(LIBS) $(CXXLIBS)
$(STRIP) $@
pdf2pdf$(E): pdf2pdf.$(O) $(PDF2SWF_OBJ)
$(LL) pdf2pdf.$(O) -o $@ $(PDF2SWF_OBJ) $(LIBS) $(CXXLIBS)
$(STRIP) $@
+gfx2gfx$(E): gfx2gfx.$(O) $(OCR_OBJ) $(PDF2SWF_OBJ)
+ $(LL) gfx2gfx.$(O) -o $@ $(OCR_OBJ) $(PDF2SWF_OBJ) $(LIBS) $(CXXLIBS)
+ $(STRIP) $@
swfc$(E): parser.$(O) swfc.$(O) swfc-feedback.$(O) swfc-history.$(O) swfc-interpolation.$(O) ../lib/librfxswf$(A) ../lib/libbase$(A)
$(L) parser.$(O) swfc.$(O) swfc-feedback.$(O) swfc-history.$(O) swfc-interpolation.$(O) -o $@ ../lib/librfxswf$(A) ../lib/libbase$(A) $(LIBS)
$(STRIP) $@
clean:
rm -f *.o *.obj *.lo *.la *~ gmon.out
- rm -f as3compile gif2swf swfbbox swfbytes swfbytes swfdump pdf2swf wav2swf png2swf swfcombine swfextract swfstrings png2swf jpeg2swf swfc font2swf
- @rm -f gif2swf.exe swfbytes.exe swfbytes.exe pdf2swf.exe swfbbox.exe swfdump.exe wav2swf.exe png2swf.exe swfcombine.exe swfextract.exe swfstrings.exe png2swf.exe jpeg2swf.exe swfc.exe font2swf.exe
- @rm -f gif2swf$(E) pdf2swf$(E) swfbytes$(E) swfbytes$(E) swfbbox$(E) swfdump$(E) wav2swf$(E) png2swf$(E) swfcombine$(E) swfextract$(E) swfstrings$(E) png2swf$(E) jpeg2swf$(E) swfc$(E) font2swf$(E)
+ rm -f as3compile gif2swf swfbbox swfbytes swfbytes swfdump pdf2swf wav2swf png2swf swfcombine swfextract swfstrings png2swf jpeg2swf swfc font2swf pdf2pdf gfx2gfx
+ @rm -f gif2swf.exe swfbytes.exe swfbytes.exe pdf2swf.exe swfbbox.exe swfdump.exe wav2swf.exe png2swf.exe swfcombine.exe swfextract.exe swfstrings.exe png2swf.exe jpeg2swf.exe swfc.exe font2swf.exe pdf2pdf.exe gfx2gfx.exe
+ @rm -f gif2swf$(E) pdf2swf$(E) swfbytes$(E) swfbytes$(E) swfbbox$(E) swfdump$(E) wav2swf$(E) png2swf$(E) swfcombine$(E) swfextract$(E) swfstrings$(E) png2swf$(E) jpeg2swf$(E) swfc$(E) font2swf$(E) pdf2pdf$(E) gfx2gfx$(E)
doc:
perl ../parsedoc.pl wav2swf.doc
#include "../../swftools/lib/devices/text.h"
#include "../../swftools/lib/devices/render.h"
#include "../../swftools/lib/devices/bbox.h"
+#ifdef HAVE_LRF
#include "../../swftools/lib/devices/lrf.h"
+#endif
#include "../../swftools/lib/devices/ocr.h"
#include "../../swftools/lib/devices/rescale.h"
#include "../../swftools/lib/devices/record.h"
static int loglevel = 3;
static char * pagerange = 0;
static char * filename = 0;
-static const char * format = "ocr";
+static const char * format = 0;
int args_callback_option(char*name,char*val) {
if (!strcmp(name, "o"))
exit(1);
}
+ if(!format) {
+ char*x = strrchr(outputname, '.');
+ if(x)
+ format = x+1;
+ }
+
+
gfxresult_t*result = 0;
- if(!strcmp(format, "lrf")) {
+#ifdef HAVE_LRF
+ if(!strcasecmp(format, "lrf")) {
gfxdevice_t lrf;
gfxdevice_lrf_init(&lrf);
}
}
result = out->finish(out);
- } else {
+ } else
+#endif
+ {
gfxdevice_t _out,*out=&_out;
- if(!strcmp(format, "ocr")) {
+ if(!strcasecmp(format, "ocr")) {
gfxdevice_ocr_init(out);
- } if(!strcmp(format, "swf")) {
+ } if(!strcasecmp(format, "swf")) {
gfxdevice_swf_init(out);
- } if(!strcmp(format, "img")) {
+ } if(!strcasecmp(format, "img") || !strcasecmp(format, "png")) {
gfxdevice_render_init(out);
- } if(!strcmp(format, "txt")) {
+ } if(!strcasecmp(format, "txt")) {
gfxdevice_text_init(out);
}