I appreciate the option to compress temporary files, but it would be
nice if I could instruct gscan2pdf to always work with temporary
files, i.e. not to create uncompressed files in the first place.
Thanks,
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-trunk-686 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gscan2pdf depends on:
ii imagemagick 7:6.5.8.3-1 image manipulation programs
ii libconfig-general-perl 2.44-1 Generic Configuration Module
ii libforks-perl 0.33-1 forks - emulate threads with fork
ii libgtk2-ex-simple-list-perl 0.50-1.1 A simple interface to Gtk2's compl
ii libgtk2-imageview-perl 0.05-1 Perl bindings for the GtkImageView
ii liblocale-gettext-perl 1.05-6 Using libc functions for internati
ii libpdf-api2-perl 0.73-1 module for creating or modifying P
ii librsvg2-common 2.26.0-1 SAX-based renderer library for SVG
ii libsane-perl 0.03-1 Perl bindings for the SANE (Scanne
ii libset-intspan-perl 1.13-2 Manages sets of integers
ii libtiff-tools 3.9.2-1 TIFF manipulation and conversion t
ii perl-modules [libarchive-tar 5.10.1-8 Core Perl modules
ii perlmagick 7:6.5.8.3-1 Perl interface to the ImageMagick
ii sane-utils 1.0.20-10 API library for scanners -- utilit
Versions of packages gscan2pdf recommends:
ii djvulibre-bin 3.5.22-7 Utilities for the DjVu image forma
ii gocr 0.46-2.1 A command line OCR
ii libgtk2-ex-podviewer-perl 0.18-1 Perl Gtk2 widget for displaying Pl
ii sane 1.0.14-9 scanner graphical frontends
ii tesseract-ocr 2.04-1 Command line OCR tool
ii unpaper 0.3-1 post-processing tool for scanned p
ii xdg-utils 1.0.2-6.1 desktop integration utilities from
gscan2pdf suggests no packages.
-- no debconf information
--
.''`. martin f. krafft <madduck@d.o> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
Hmm. The compress temporary files option is perhaps badly named -
"Clean up temporary files" may be better, as what happens is that
gscan2pdf checks the temporary files in its directory against those it
actually needs, and deletes those not used any more.
It doesn't do this automatically in order to be able to undo/redo, and
for speed reasons. I could add an option in preferences to check after
every action to see which files are no longer needed and delete them
automatically.
The scans are PNMs - as this is what SANE produces, and also what
unpaper uses - so whilst it would certainly be possible to use,
for instance, PNG instead, it would require extra conversion
time/CPU. This could also be an option in preferences.
Thanks for the fast responses!
Note that the manpage says quite different:
If your temporary ($TMPDIR) directory is getting full, this
function can be useful - compressing all images at LZW-compressed
TIFFs. These require much less space than the PNM files that are
typically produced by SANE or by importing a PDF.
Maybe this could be made a bit clearer. ;)
Cheers,
--
.''`. martin f. krafft <madduck@d.o> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
"i've got a bike,
you can ride it if you like,
it's got a basket. a bell that rings, and things to make it look good.
i'd give it to you if i could,
but i borrowed it."
-- syd barrett, 1967
You are quite correct, the "Compress Temporary Files" menu item
converts all images that are not already PNG or JPG to LZW-compressed
TIFF -- AND deletes all those that are no longer required -- thereby
making undo/redo impossible.
However, the basic comment is still valid -- I could add a option in
preferences to do work natively with compressed files -- but it would
add conversion operations.
And apparently disables stuff like calling unpaper, which needs the
PNM files.
> However, the basic comment is still valid -- I could add a option
> in preferences to do work natively with compressed files -- but it
> would add conversion operations.
And maybe a command just to remove the unreferenced files,
separating the functionality from the compression.
Yes, it adds conversion, but despite 1Gb /tmp space, I find that for
big documents, that's usually my bottleneck, not the CPU.
--
.''`. martin f. krafft <madduck@d.o> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
"brevity is the soul of wit."
-- polonius (hamlet)
"brevity is ... wit."
-- the simpsons
gscan2pdf converts automatically back to PNM for unpaper. It works
here - I've just tried it.
> And maybe a command just to remove the unreferenced files,
> separating the functionality from the compression.
OK.
> Yes, it adds conversion, but despite 1Gb /tmp space, I find that for
> big documents, that's usually my bottleneck, not the CPU.
OK. I guess that only leaves the question on how to decide what sort
of compression to use. Unless you have any better ideas, I'll use
LZW-compressed TIFFs, as they are non-lossy. An alternative would be PNG.
Hm, are there any data comparing the two? I tend towards PNG simply
because it's more standard, but if tiff.lzw gives better CPU/saving
ratios, then that would be it.
--
.''`. martin f. krafft <madduck@d.o> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
"driving with a destination
is like having sex to have children"
-- backwater wayne miller