stuff
This commit is contained in:
parent
990dc4fd16
commit
587ff112f0
@ -74,6 +74,12 @@
|
||||
- added im__colour_unary()
|
||||
- drop "set" postfix from names, so "insert" can now take a vector of positions
|
||||
- deprecate all the "_raw" variants, not really necessary now
|
||||
- removed "contrib", not very useful anymore
|
||||
- added im_header_as_string()
|
||||
- im_malloc()/im_free() now call g_try_malloc()/g_free() ... removes confusion
|
||||
over whether to use im_free() or g_free() for things like im_header_string()
|
||||
- added im_history_get(), im_getexp(), im_printdesc() as wrapped functions ...
|
||||
so you no longer need the "header" program
|
||||
|
||||
25/3/09 started 7.18.0
|
||||
- revised version numbers
|
||||
|
@ -11,7 +11,6 @@ SUBDIRS = \
|
||||
libvips \
|
||||
tools \
|
||||
libvipsCC \
|
||||
contrib \
|
||||
man \
|
||||
po \
|
||||
doc \
|
||||
|
5
TODO
5
TODO
@ -21,9 +21,6 @@
|
||||
|
||||
how odd
|
||||
|
||||
- vip2dj -rotate STILL does not always work, eg. try
|
||||
/data/john/study2/small0.v ... should NOT rotate, but it does
|
||||
|
||||
- rename "header" program? or maybe use "vips header" instead?
|
||||
|
||||
it's disabled on ubuntu due to a name clash
|
||||
@ -45,8 +42,6 @@ WONTFIX for 7.20
|
||||
|
||||
get about 300 images in on the laptop
|
||||
|
||||
- we have tools/ and contrib/ argh, can we fix this
|
||||
|
||||
- rename vipsCC in SWIG as pyvips?
|
||||
|
||||
- im_flood*() should use inline rather than #define
|
||||
|
@ -535,15 +535,6 @@ AC_OUTPUT([
|
||||
tools/scripts/batch_rubber_sheet
|
||||
tools/scripts/light_correct
|
||||
tools/scripts/shrink_width
|
||||
contrib/Makefile
|
||||
contrib/vips2dj/Makefile
|
||||
contrib/vips2dj/share/Makefile
|
||||
contrib/vips2dj/share/vips2dj/Makefile
|
||||
contrib/vips2dj/share/vips2dj/lab/Makefile
|
||||
contrib/vips2dj/share/vips2dj/cmyk/Makefile
|
||||
contrib/vips2dj/share/vips2dj/mono/Makefile
|
||||
contrib/vdump/Makefile
|
||||
contrib/mitsub/Makefile
|
||||
swig/Makefile
|
||||
swig/vipsCC/Makefile
|
||||
man/Makefile
|
||||
|
@ -1,4 +0,0 @@
|
||||
SUBDIRS = \
|
||||
vips2dj \
|
||||
mitsub \
|
||||
vdump
|
@ -1,7 +0,0 @@
|
||||
bin_PROGRAMS = mitsub
|
||||
|
||||
mitsub_SOURCES = mitsub.c
|
||||
|
||||
INCLUDES = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
|
||||
AM_LDFLAGS = @LDFLAGS@
|
||||
LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@
|
@ -1,491 +0,0 @@
|
||||
/*
|
||||
* Version which sents raw data to the printer, which enlarges and centers.
|
||||
* Works for monochrome and four band IM_TYPE_CMYK images. Uses putc instead of
|
||||
* fprintf. Sents data straight to the printer. If enlargement, it is full and
|
||||
* x and y ratios are the same (aspect ratio is not changed)
|
||||
*
|
||||
* Helene Chahine, July 95
|
||||
*
|
||||
* JC 4/8/95
|
||||
* - small tidies and bug fixes
|
||||
* - now does 1, 3 and 4 band
|
||||
* - resets printer after use
|
||||
* JC 1/9/95
|
||||
* - colour reverse mode added
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/util.h>
|
||||
|
||||
#define NBPRINT 1 /* Maximun 15 copies */
|
||||
#define VMAX 2904 /* Number of horizontal pixels */
|
||||
#define HMAX 2368 /* Number of vertical pixels */
|
||||
|
||||
int
|
||||
main( int argc, char *argv[] )
|
||||
{
|
||||
int enlar = 0;
|
||||
int center = 0;
|
||||
int rev = 0;
|
||||
|
||||
IMAGE *vips;
|
||||
FILE *out;
|
||||
int n1, n2;
|
||||
int x, y;
|
||||
int xsize, ysize;
|
||||
int c;
|
||||
PEL *p;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
|
||||
while( --argc > 0 && (*++argv)[0] == '-' )
|
||||
while( (c = *++argv[0]) )
|
||||
switch( c ) {
|
||||
case 'e':
|
||||
enlar = 1;
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
center = 1;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
rev = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
error_exit( "mitsub: illegal option %c", c );
|
||||
}
|
||||
|
||||
if( argc != 2 )
|
||||
error_exit( "usage: mitsub [-ecr] vipsfile mitfile\n"
|
||||
"where:\n"
|
||||
"\tvipsfile may be 1, 3 or 4 bands for mono, IM_TYPE_RGB or "
|
||||
"IM_TYPE_CMYK printing\n"
|
||||
"\tmitfile may be '-', meaning send to stdout\n"
|
||||
"\t-e means enlarge to fill page\n"
|
||||
"\t-c means centre within page\n"
|
||||
"\t-r means reverse black/white\n"
|
||||
"\tNOTE: data is sent raw, with 0 == no ink - all correction is up to "
|
||||
"you\n"
|
||||
"example:\n"
|
||||
"\t%% mitsub -ec fred.v - > /dev/bpp0" );
|
||||
|
||||
if( !(vips = im_open( argv[0], "r" )) )
|
||||
error_exit( "mitsub: unable to open \"%s\" for input",
|
||||
argv[0] );
|
||||
|
||||
if( strcmp( argv[1], "-" ) == 0 )
|
||||
out = stdout;
|
||||
else if( !(out = fopen( argv[1], "w" )) )
|
||||
error_exit( "mitsub: unable to open \"%s\" for output",
|
||||
argv[1] );
|
||||
|
||||
if( vips->Coding != IM_CODING_NONE || vips->BandFmt != IM_BANDFMT_UCHAR )
|
||||
error_exit( "mitsub: uncoded uchar only" );
|
||||
if( vips->Bands != 1 && vips->Bands != 3 && vips->Bands != 4 )
|
||||
error_exit( "mitsub: 1,3 and 4 band images only" );
|
||||
|
||||
/* Set xsize and ysize.
|
||||
*/
|
||||
if( vips->Xsize <= vips->Ysize ) {
|
||||
xsize = vips->Xsize;
|
||||
ysize = vips->Ysize;
|
||||
}
|
||||
else {
|
||||
im_diag( "mitsub", "%s", _( "rotating ..." ) );
|
||||
xsize = vips->Ysize;
|
||||
ysize = vips->Xsize;
|
||||
}
|
||||
|
||||
/* Shrink if image is too big.
|
||||
*/
|
||||
if( xsize > HMAX || ysize > VMAX ) {
|
||||
double x_factor = HMAX/xsize;
|
||||
double y_factor = VMAX/ysize;
|
||||
double factor = IM_MAX( x_factor, y_factor );
|
||||
IMAGE *sh = im_open( "shrink", "t" );
|
||||
|
||||
im_diag( "mitsub", _( "shrinking by %g ..." ), factor );
|
||||
if( !sh || im_shrink( vips, sh, factor, factor ) )
|
||||
error_exit( "mitsub: shrink failed" );
|
||||
|
||||
vips = sh;
|
||||
enlar = 0;
|
||||
}
|
||||
|
||||
/* On line command and buffer clear.
|
||||
*/
|
||||
putc( 0x11, out );
|
||||
putc( 0x1b, out );
|
||||
putc( 'Z', out );
|
||||
|
||||
/* Memory clear.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( 'Z', out );
|
||||
|
||||
/* Media size. (Size A4)
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '#', out );
|
||||
putc( 'P', out );
|
||||
putc( '0', out );
|
||||
|
||||
/* Enlargement.
|
||||
*/
|
||||
if( enlar ) {
|
||||
double rh, rv;
|
||||
int n, m;
|
||||
|
||||
/* Enlarge method: ('0'=simple enlargement,
|
||||
* '1'=linear enlargement)
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'O', out );
|
||||
putc( '1', out );
|
||||
|
||||
rh = HMAX/(double) xsize;
|
||||
rv = VMAX/(double) ysize;
|
||||
if( rh > 8 || rv > 8 ) {
|
||||
n = 8;
|
||||
m = 1;
|
||||
}
|
||||
else if( rh > rv ) {
|
||||
double fact = VMAX/255;
|
||||
|
||||
n = 255;
|
||||
m = (int) ysize/fact + 1;
|
||||
}
|
||||
else {
|
||||
double fact = HMAX/255;
|
||||
|
||||
n = 255;
|
||||
m = (int) xsize/fact + 1;
|
||||
}
|
||||
im_diag( "mitsub", _( "enlarging by %g ..." ), (double) n/m );
|
||||
|
||||
/* Horizontal enlarge.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'P', out );
|
||||
putc( n, out );
|
||||
putc( m, out );
|
||||
|
||||
/* Vertical enlarge.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'Q', out );
|
||||
putc( n, out );
|
||||
putc( m, out );
|
||||
|
||||
}
|
||||
else {
|
||||
/* No enlargement.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'O', out );
|
||||
putc( '1', out );
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'P', out );
|
||||
putc( 1, out );
|
||||
putc( 1, out );
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'Q', out );
|
||||
putc( 1, out );
|
||||
putc( 1, out );
|
||||
}
|
||||
|
||||
if( rev ) {
|
||||
/* Colour reversing.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'W', out );
|
||||
putc( '2', out );
|
||||
}
|
||||
else {
|
||||
/* No reverse.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'W', out );
|
||||
putc( '0', out );
|
||||
}
|
||||
|
||||
/* Number of copies.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '#', out );
|
||||
putc( 'C', out );
|
||||
putc( NBPRINT, out );
|
||||
|
||||
/* Left margin.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'S', out );
|
||||
putc( 0, out );
|
||||
|
||||
/* Top margin.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'T', out );
|
||||
putc( 0, out );
|
||||
|
||||
/* Centering. ('1' = centering available, '0'= no centering).
|
||||
*/
|
||||
if( center ) {
|
||||
im_diag( "mitsub", "%s", _( "centering ..." ) );
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'C', out );
|
||||
putc( '1', out );
|
||||
}
|
||||
else {
|
||||
/* No centering.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'C', out );
|
||||
putc( '0', out );
|
||||
}
|
||||
|
||||
/* Transfer format = pixel order method for colour, = frame order
|
||||
* method for monochrome.
|
||||
*/
|
||||
switch( vips->Bands ) {
|
||||
case 3:
|
||||
case 4:
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'A', out );
|
||||
putc( '2', out );
|
||||
break;
|
||||
|
||||
case 1:
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'A', out );
|
||||
putc( '0', out );
|
||||
break;
|
||||
|
||||
default:
|
||||
error_exit( "internal error" );
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/* Colour specification.
|
||||
*/
|
||||
switch( vips->Bands ) {
|
||||
case 4:
|
||||
case 1:
|
||||
/* IM_TYPE_CMYK. For mono, send just K.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'I', out );
|
||||
putc( '2', out );
|
||||
break;
|
||||
|
||||
case 3:
|
||||
/* IM_TYPE_RGB.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'I', out );
|
||||
putc( '0', out );
|
||||
break;
|
||||
|
||||
default:
|
||||
error_exit( "internal error" );
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/* Gray scale level.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '#', out );
|
||||
putc( 'L', out );
|
||||
putc( 8, out );
|
||||
|
||||
/* Rotation.
|
||||
*/
|
||||
if( vips->Xsize <= vips->Ysize ) {
|
||||
putc( 0x1b, out );
|
||||
putc( '#', out );
|
||||
putc( 'R', out );
|
||||
putc( '0', out );
|
||||
}
|
||||
else {
|
||||
putc( 0x1b, out );
|
||||
putc( '#', out );
|
||||
putc( 'R', out );
|
||||
putc( '1', out );
|
||||
}
|
||||
|
||||
/* Horizontal shift.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'J', out );
|
||||
putc( 0, out );
|
||||
putc( 0, out );
|
||||
|
||||
/* Vertical shift.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'K', out );
|
||||
putc( 0, out );
|
||||
putc( 0, out );
|
||||
|
||||
/* Number of horizontal pixels.
|
||||
*/
|
||||
n1 = vips->Xsize >> 8;
|
||||
n2 = vips->Xsize & 0xff;
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'H', out );
|
||||
putc( n1, out );
|
||||
putc( n2, out );
|
||||
|
||||
/* Number of vertical pixels.
|
||||
*/
|
||||
n1 = vips->Ysize >> 8;
|
||||
n2 = vips->Ysize & 0xff;
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'V', out );
|
||||
putc( n1, out );
|
||||
putc( n2, out );
|
||||
|
||||
/* Transfer colour (for monochrome image only).
|
||||
*/
|
||||
if( vips->Bands == 1 ) {
|
||||
putc( 0x1b, out );
|
||||
putc( 'C', out );
|
||||
putc( '4', out );
|
||||
}
|
||||
|
||||
/* Image data transfer. Image must be sent as YMCK.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( 'O', out );
|
||||
if( im_incheck( vips ) )
|
||||
error_exit( "mitsub: unable to read image data" );
|
||||
p = (PEL *) vips->data;
|
||||
switch( vips->Bands ) {
|
||||
case 4:
|
||||
im_diag( "mitsub", "%s", _( "sending IM_TYPE_CMYK ..." ) );
|
||||
for( y = 0; y < vips->Ysize; y++ )
|
||||
for( x = 0; x < vips->Xsize; x++ ) {
|
||||
putc( p[2], out );
|
||||
putc( p[1], out );
|
||||
putc( p[0], out );
|
||||
putc( p[3], out );
|
||||
p += 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
im_diag( "mitsub", "%s", _( "sending IM_TYPE_RGB ..." ) );
|
||||
for( y = 0; y < vips->Ysize; y++ )
|
||||
for( x = 0; x < vips->Xsize; x++ ) {
|
||||
putc( p[0], out );
|
||||
putc( p[1], out );
|
||||
putc( p[2], out );
|
||||
p += 3;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
im_diag( "mitsub", "%s", _( "sending K ..." ) );
|
||||
for( y = 0; y < vips->Ysize; y++ )
|
||||
for( x = 0; x < vips->Xsize; x++ )
|
||||
putc( *p++, out );
|
||||
break;
|
||||
}
|
||||
|
||||
/* Form feed. Page end.
|
||||
*/
|
||||
putc( 0x0c, out );
|
||||
|
||||
/* Now try to reset printer to default settings.
|
||||
*
|
||||
* No enlargement.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'O', out );
|
||||
putc( '1', out );
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'P', out );
|
||||
putc( 1, out );
|
||||
putc( 1, out );
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'Q', out );
|
||||
putc( 1, out );
|
||||
putc( 1, out );
|
||||
|
||||
/* No centering.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'C', out );
|
||||
putc( '0', out );
|
||||
|
||||
/* No colour reverse.
|
||||
*/
|
||||
putc( 0x1b, out );
|
||||
putc( '&', out );
|
||||
putc( 'W', out );
|
||||
putc( '0', out );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
bin_PROGRAMS = vdump
|
||||
|
||||
vdump_SOURCES = vdump.c
|
||||
|
||||
man_MANS = \
|
||||
vdump.1
|
||||
|
||||
pkgdata_DATA = \
|
||||
vdump.pro
|
||||
|
||||
INCLUDES = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
|
||||
AM_LDFLAGS = @LDFLAGS@
|
||||
LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@
|
||||
|
||||
EXTRA_DIST = $(pkgdata_DATA) $(man_MANS)
|
@ -1,69 +0,0 @@
|
||||
.TH VDUMP 1 "July 1990"
|
||||
.SH NAME
|
||||
vdump \- convert VIPS image files to Postscript
|
||||
.SH SYNOPSIS
|
||||
.B vdump
|
||||
[
|
||||
.B \-slpDa
|
||||
]
|
||||
.IR filename
|
||||
.SH DESCRIPTION
|
||||
.B vdump
|
||||
turns the vasari format file in its argument to encapsulated PostScript on its
|
||||
stadard output. The result can be
|
||||
either sent directly to a printer or included in any document processor which
|
||||
supports encapsulated PostScript diagrams - eg. WordPerfect, Tex etc. For
|
||||
example:
|
||||
.IP
|
||||
.B
|
||||
example% vdump campin.v | lpr -Plaser
|
||||
.LP
|
||||
or
|
||||
.IP
|
||||
.B
|
||||
example% vdump -l -s4 -D campin.v > campin.PS
|
||||
.LP
|
||||
.br
|
||||
.B vdump
|
||||
normally outputs portrait, you can force output to portrait or landscape with the
|
||||
.BR \-p
|
||||
or
|
||||
.BR \-l
|
||||
flags.
|
||||
|
||||
.br
|
||||
The
|
||||
.BR \-a
|
||||
flag makes vdump select
|
||||
either portrait or landscape orientation so as to get
|
||||
the largest possible image onto an A4 sheet.
|
||||
|
||||
.br
|
||||
.B vdump
|
||||
will dump one or three band unsigned char images only.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-p
|
||||
Force portrait output.
|
||||
.TP
|
||||
.B \-l
|
||||
Force landscape output.
|
||||
.TP
|
||||
.B \-a
|
||||
Automatically select portrait/landscape.
|
||||
.TP
|
||||
.B \-s<factor>
|
||||
Set a sub-sampling factor (default 1).
|
||||
.BR \-s1
|
||||
will not sub-sample at all,
|
||||
.BR \-s4
|
||||
will reduce by a factor of 4.
|
||||
.TP
|
||||
.B \-D
|
||||
Produce output suitable for including in documents. This option
|
||||
simply supresses the generation of a showpage command.
|
||||
.SH SEE\ ALSO
|
||||
ip(1), vips2dj(1)
|
||||
.SH COPYRIGHT
|
||||
.br
|
||||
1990: J. Cupitt, National Gallery
|
@ -1,399 +0,0 @@
|
||||
/* This is incredibly primitive and annoying.
|
||||
*
|
||||
* Turn a VASARI format file into PostScript. Do simple subsampling of
|
||||
* images to get the size down .. no point in sending anything much larger
|
||||
* than 100x100 to the laserwriter if it's going in a document. The output
|
||||
* conforms to PS-Adobe-2.0 EPSF-2.0, I think.
|
||||
*
|
||||
* Options:
|
||||
* -s<n> Average an nxn area in the image for each pixel in the output.
|
||||
* This reduces the size of the files significantly (obviously).
|
||||
* Default 1.
|
||||
* -l Force landscape output
|
||||
* -p Force portrait output (default)
|
||||
* -a Automatic choice of portrait/landscape
|
||||
* Nasty: as we have to include a %%BoundingBox: line, we can't
|
||||
* size the image to fit comfortably in whatever size paper this
|
||||
* PostScript printer takes.
|
||||
* -D Supress generation of showpage. Sometimes necessary if you
|
||||
* want to include the PS file in a document.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/util.h>
|
||||
|
||||
#define USAGE "usage: [-s<scale> -alpD] vasari_format_file"
|
||||
#define PROLOGUE "vdump.pro"
|
||||
#define PAPER_WIDTH (8.25*72.0) /* Paper size .. A4 */
|
||||
#define PAPER_HEIGHT (11.75*72.0)
|
||||
#define PAPER_MARGIN (1.0*72.0) /* Margin we leave around the edge */
|
||||
#define PRINT_WIDTH (PAPER_WIDTH - 2.0*PAPER_MARGIN)
|
||||
#define PRINT_HEIGHT (PAPER_HEIGHT - 2.0*PAPER_MARGIN)
|
||||
#define PRINT_RATIO (PRINT_WIDTH / PRINT_HEIGHT)
|
||||
|
||||
/* Useful: a pixel. We mmap the file, then cast the pointer to the image to
|
||||
* a pointer to one of these things.
|
||||
*/
|
||||
struct pixel {
|
||||
unsigned char p_red;
|
||||
unsigned char p_green;
|
||||
unsigned char p_blue;
|
||||
};
|
||||
|
||||
/* A monochrome pixel.
|
||||
*/
|
||||
struct mpixel {
|
||||
unsigned char p_val;
|
||||
};
|
||||
|
||||
enum output_format {
|
||||
LANDSCAPE, /* Rotated by 90 degrees */
|
||||
PORTRAIT, /* Vertical */
|
||||
AUTOMATIC /* Whichever fits best */
|
||||
};
|
||||
|
||||
static const char *our_name; /* Name of this prog */
|
||||
static char *file_name; /* Name of file we dump */
|
||||
static int print_on = 1; /* Generate showpage */
|
||||
|
||||
/* Copy between two fds
|
||||
*/
|
||||
static void
|
||||
copy_file( from, to )
|
||||
FILE *from, *to;
|
||||
{ int ch;
|
||||
|
||||
while( (ch = getc( from )) != EOF )
|
||||
putc( ch, to );
|
||||
}
|
||||
|
||||
/* Send a file to stdout. Used to transmit the prelude.
|
||||
*/
|
||||
static int
|
||||
transmit_file( name )
|
||||
char *name;
|
||||
{ const char *prefix;
|
||||
char buf[PATH_MAX];
|
||||
FILE *fp;
|
||||
|
||||
if( !(prefix = im_guess_prefix( our_name, "VIPSHOME" )) )
|
||||
error_exit( "VIPSHOME not defined" );
|
||||
im_snprintf( buf, PATH_MAX, "%s/share/%s/%s", prefix, PACKAGE, name );
|
||||
|
||||
/* Send it!
|
||||
*/
|
||||
if( !(fp = fopen( buf, "r" )) )
|
||||
error_exit( "can't find %s", name );
|
||||
copy_file( fp, stdout );
|
||||
fclose( fp );
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/* Encode a colour VASARI file as mono hex bytes. Scale down by a factor of
|
||||
* s. We scale by averaging regions of sxs pixels .. is this the best way?
|
||||
* works ok for our laserwriter anyway. We lose incomplete regions down the RH
|
||||
* side and across the bottom.
|
||||
*/
|
||||
static void
|
||||
encode_colour( im, s, data )
|
||||
IMAGE *im;
|
||||
int s;
|
||||
struct pixel *data;
|
||||
{ int p = 35;
|
||||
int x, y;
|
||||
int i, j;
|
||||
|
||||
/* Scan across and down. Make sure we chop off those incomplete
|
||||
* regions on the RH side and across the bottom.
|
||||
*/
|
||||
for( y = 0; y <= im->Ysize - s; y += s )
|
||||
for( x = 0; x <= im->Xsize - s; x += s ) {
|
||||
int col = 0;
|
||||
struct pixel *rs = &data[y * im->Xsize + x];
|
||||
|
||||
/* Now average the region. We monochromise each pixel
|
||||
* and add it to the running total.
|
||||
*/
|
||||
for( i = 0; i < s; i++ ) {
|
||||
struct pixel *d = &rs[i * im->Xsize];
|
||||
|
||||
for( j = 0; j < s; j++ ) {
|
||||
col += (int) (d->p_red + d->p_green +
|
||||
d->p_blue) / 3;
|
||||
d++;
|
||||
}
|
||||
}
|
||||
col /= s*s;
|
||||
|
||||
/* Output the averaged pixel.
|
||||
*/
|
||||
printf( "%02x", col );
|
||||
if( !p-- ) {
|
||||
printf( "\n" );
|
||||
p = 35;
|
||||
}
|
||||
}
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
/* Encode a mono VASARI file as hex bytes. Scale down by a factor of
|
||||
* s. We scale by averaging regions of sxs pixels .. is this the best way?
|
||||
* works ok for our laserwriter anyway. We lose incomplete regions down the RH
|
||||
* side and across the bottom.
|
||||
*/
|
||||
static void
|
||||
encode_mono( im, s, data )
|
||||
IMAGE *im;
|
||||
int s;
|
||||
struct mpixel *data;
|
||||
{ int p = 35;
|
||||
int x, y;
|
||||
int i, j;
|
||||
|
||||
/* Scan across and down. Make sure we chop off those incomplete
|
||||
* regions on the RH side and across the bottom.
|
||||
*/
|
||||
for( y = 0; y <= im->Ysize - s; y += s )
|
||||
for( x = 0; x <= im->Xsize - s; x += s ) {
|
||||
int col = 0;
|
||||
struct mpixel *rs = &data[y * im->Xsize + x];
|
||||
|
||||
/* Now average the region.
|
||||
*/
|
||||
for( i = 0; i < s; i++ ) {
|
||||
struct mpixel *d = &rs[i * im->Xsize];
|
||||
|
||||
for( j = 0; j < s; j++ )
|
||||
col += d++->p_val;
|
||||
}
|
||||
col /= s*s;
|
||||
|
||||
/* Output the averaged pixel.
|
||||
*/
|
||||
printf( "%02x", col );
|
||||
if( !p-- ) { printf( "\n" ); p = 35; }
|
||||
}
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
/* Print the image. Work out the orientation, print the prologue, then call
|
||||
* one of the dumps above to do the image.
|
||||
*/
|
||||
static void
|
||||
dump( im, format, scale )
|
||||
IMAGE *im;
|
||||
enum output_format format;
|
||||
int scale;
|
||||
{ float r, width, height, xstart, ystart;
|
||||
|
||||
/* Fix orientation, then set our origin and output size. Four cases ..
|
||||
* can any of these be combined? Perhaps not.
|
||||
*/
|
||||
r = (float) im->Xsize / im->Ysize;
|
||||
if( format == AUTOMATIC ) {
|
||||
if( im->Xsize > im->Ysize )
|
||||
format = LANDSCAPE;
|
||||
else
|
||||
format = PORTRAIT;
|
||||
}
|
||||
|
||||
if( format == PORTRAIT ) {
|
||||
/* Is it going to be smaller than the paper vertically or
|
||||
* horizontally?
|
||||
*/
|
||||
if( r > PRINT_RATIO ) {
|
||||
/* It's too wide. We make it as large as possible
|
||||
* horizontally, then center it vertically.
|
||||
*/
|
||||
width = PRINT_WIDTH;
|
||||
height = PRINT_WIDTH / r;
|
||||
xstart = PAPER_MARGIN;
|
||||
ystart = (PRINT_HEIGHT - height) / 2.0 + PAPER_MARGIN;
|
||||
}
|
||||
else {
|
||||
/* Too high. Make as large as possible vertically,
|
||||
* then center it horizontally.
|
||||
*/
|
||||
height = PRINT_HEIGHT;
|
||||
width = PRINT_HEIGHT * r;
|
||||
ystart = PAPER_MARGIN;
|
||||
xstart = (PRINT_WIDTH - width) / 2.0 + PAPER_MARGIN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Do a landscape picture. Will we run out of space
|
||||
* horizontally or vertically?
|
||||
*/
|
||||
if( 1.0 / r < PRINT_RATIO ) {
|
||||
/* Very wide indeed! Fit it horizontally, then center
|
||||
* it vertically.
|
||||
*/
|
||||
height = PRINT_HEIGHT;
|
||||
width = PRINT_HEIGHT / r;
|
||||
ystart = PAPER_MARGIN;
|
||||
xstart = (PRINT_WIDTH - width) / 2.0 + PAPER_MARGIN;
|
||||
}
|
||||
else {
|
||||
/* Too tall. Make as large as possible vertically,
|
||||
* then center it horizontally.
|
||||
*/
|
||||
width = PRINT_WIDTH;
|
||||
height = PRINT_WIDTH * r;
|
||||
xstart = PAPER_MARGIN;
|
||||
ystart = (PRINT_HEIGHT - height) / 2.0 + PAPER_MARGIN;
|
||||
}
|
||||
}
|
||||
|
||||
/* Print header.
|
||||
*/
|
||||
printf( "%%!PS-Adobe-2.0 EPSF-2.0\n" );
|
||||
printf( "%%%%BoundingBox: %d %d %d %d\n", (int) xstart, (int) ystart,
|
||||
(int) (width + xstart), (int) (height + ystart) );
|
||||
printf( "%%%%Title: %s\n", file_name );
|
||||
printf( "%%%%Creator: %s\n", our_name );
|
||||
|
||||
/* Print prologue.
|
||||
*/
|
||||
transmit_file( PROLOGUE );
|
||||
|
||||
/* Print position, scale and rotation. Print size in pixels and call
|
||||
* doimage.
|
||||
*/
|
||||
if( format == LANDSCAPE )
|
||||
printf( "%d %d translate\n",
|
||||
(int) (xstart + width), (int) ystart );
|
||||
else
|
||||
printf( "%d %d translate\n", (int) xstart, (int) ystart );
|
||||
printf( "%d %d scale\n", (int) width, (int) height );
|
||||
if( format == LANDSCAPE )
|
||||
printf( "90 rotate\n" );
|
||||
printf( "%d %d 8 doimage\n",
|
||||
(int) (im->Xsize / scale), (int) (im->Ysize / scale) );
|
||||
|
||||
/* Print body of file.
|
||||
*/
|
||||
if( im->Bands == 3 )
|
||||
encode_colour( im, scale, (struct pixel *) im->data );
|
||||
else
|
||||
encode_mono( im, scale, (struct mpixel *) im->data );
|
||||
|
||||
/* Print trailer.
|
||||
*/
|
||||
if( print_on )
|
||||
printf( "showpage\n" );
|
||||
printf( "%%%%EndDocument\n" );
|
||||
}
|
||||
|
||||
/* Start here!
|
||||
*/
|
||||
int
|
||||
main( argc, argv )
|
||||
int argc;
|
||||
char **argv;
|
||||
{ int scale = 1;
|
||||
enum output_format format = PORTRAIT;
|
||||
IMAGE *im = NULL;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
|
||||
our_name = *argv;
|
||||
|
||||
/* Decode args .. just look for file names and our three options.
|
||||
*/
|
||||
while( --argc )
|
||||
if( *argv[argc] == '-' )
|
||||
switch( argv[argc][1] ) {
|
||||
case 's':
|
||||
if( sscanf( argv[argc] + 2,
|
||||
"%d", &scale ) != 1 )
|
||||
error_exit( USAGE );
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
format = LANDSCAPE;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
format = PORTRAIT;
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
format = AUTOMATIC;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
print_on = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
error_exit( USAGE );
|
||||
break;
|
||||
}
|
||||
else {
|
||||
/* Try to open the file. If we have previously opened,
|
||||
* then flag an error.
|
||||
*/
|
||||
if( im != NULL )
|
||||
error_exit( USAGE );
|
||||
file_name = argv[argc];
|
||||
if( !(im = im_open( file_name, "r" )) )
|
||||
error_exit( "unable to open %s", file_name );
|
||||
}
|
||||
if( im == NULL ) error_exit( USAGE );
|
||||
|
||||
/* Check it for suitability. We can print colour
|
||||
* or monochrome pictures.
|
||||
*/
|
||||
if( im->Coding != IM_CODING_NONE )
|
||||
error_exit( "cannot print compressed pictures" );
|
||||
if( !(
|
||||
(im->Bands == 3 && im->Bbits == 8 &&
|
||||
im->BandFmt == IM_BANDFMT_UCHAR) ||
|
||||
(im->Bands == 1 && im->Bbits == 8 &&
|
||||
im->BandFmt == IM_BANDFMT_UCHAR)
|
||||
) )
|
||||
error_exit( "can only print mono or colour images" );
|
||||
if( im_incheck( im ) )
|
||||
error_exit( "unable to get pixels" );
|
||||
|
||||
dump( im, format, scale);
|
||||
|
||||
return( 0 );
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
%%Pages: 1
|
||||
%%Creator: vdump
|
||||
%%EndComments
|
||||
%%BeginDocument: vdump
|
||||
/doimage {
|
||||
/b exch def /m exch def /n exch def
|
||||
/pix n string def
|
||||
n m b [n 0 0 m neg 0 m]
|
||||
{ currentfile pix readhexstring pop }
|
||||
image
|
||||
} def
|
||||
/spotsize {
|
||||
/perinch exch def
|
||||
currentscreen 3 -1 roll
|
||||
pop perinch
|
||||
3 1 roll setscreen
|
||||
} def
|
||||
/invert {
|
||||
/curtran currenttransfer cvlit def
|
||||
/newtran curtran length 3 add array def
|
||||
newtran 0 {1 exch sub} putinterval
|
||||
newtran 3 curtran putinterval
|
||||
newtran cvx settransfer
|
||||
} def
|
||||
80 spotsize
|
@ -1,17 +0,0 @@
|
||||
SUBDIRS = share
|
||||
|
||||
bin_PROGRAMS = \
|
||||
vips2dj
|
||||
|
||||
vips2dj_DEPENDENCIES = vips2dj.h
|
||||
|
||||
vips2dj_SOURCES = \
|
||||
vips2ah.c \
|
||||
vips2dj.c
|
||||
|
||||
INCLUDES = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
|
||||
AM_LDFLAGS = @LDFLAGS@
|
||||
LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@
|
||||
|
||||
EXTRA_DIST = ${vips2dj_DEPENDENCIES}
|
||||
|
@ -1,2 +0,0 @@
|
||||
SUBDIRS = vips2dj
|
||||
|
@ -1,2 +0,0 @@
|
||||
SUBDIRS = lab cmyk mono
|
||||
|
@ -1,14 +0,0 @@
|
||||
vips2djcmykpsbitsdir = $(datadir)/vips/vips2dj/cmyk
|
||||
|
||||
vips2djcmykpsbits_DATA = \
|
||||
head1 \
|
||||
head2 \
|
||||
head3 \
|
||||
head4 \
|
||||
head5 \
|
||||
head6
|
||||
|
||||
install-exec-hook:
|
||||
$(mkinstalldirs) $(DESTDIR)$(vips2djcmykpsbitsdir)
|
||||
|
||||
EXTRA_DIST = $(vips2djcmykpsbits_DATA)
|
@ -1,686 +0,0 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Title: (micro_65_macbeth.tif)
|
||||
%%Creator: (Adobe\250 Photoshop\250 6.0: AdobePS 8.7.0)
|
||||
%%CreationDate: (2:17 pm Monday, April 29, 2002)
|
||||
%%For: (FOTOG4)
|
||||
%%Routing: (mailto:Colin.White@ng-london.org.uk)
|
||||
%%Pages: 1
|
||||
%%DocumentFonts:
|
||||
%%DocumentNeededResources:
|
||||
%%DocumentSuppliedResources:
|
||||
%%DocumentData: Clean7Bit
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%DocumentMedia: (Default) 612 792 0 () ()
|
||||
%RBINumCopies: 1
|
||||
%RBINupNess: 1 1
|
||||
%ADO_ImageableArea: 30 33 582 761
|
||||
%RBIDocumentSuppliedFonts:
|
||||
[{
|
||||
%%BeginPluginPS: SetTime
|
||||
/HPDict /ProcSet findresource /SetTime get (20020429140835) exch exec
|
||||
%%EndPluginPS
|
||||
}stopped cleartomark
|
||||
[{
|
||||
%%BeginPluginPS: HPJobname
|
||||
/HPDict /ProcSet findresource /SetJobName get (micro_65_macbeth_tif) exch exec
|
||||
%%EndPluginPS
|
||||
}stopped cleartomark
|
||||
%%EndComments
|
||||
%%BeginDefaults
|
||||
%%ViewingOrientation: 1 0 0 1
|
||||
%%EndDefaults
|
||||
userdict/dscInfo 5 dict dup begin
|
||||
/Title(micro_65_macbeth.tif)def
|
||||
/Creator(Adobe\250 Photoshop\250 6.0: AdobePS 8.7.0)def
|
||||
/CreationDate(2:17 pm Monday, April 29, 2002)def
|
||||
/For(FOTOG4)def
|
||||
/Pages 1 def
|
||||
end put
|
||||
%%BeginProlog
|
||||
/md 178 dict def md begin/currentpacking where {pop /sc_oldpacking currentpacking def true setpacking}if
|
||||
%%BeginFile: lw8_feature-1.01
|
||||
%%Copyright: Copyright 1990-1999 Adobe Systems Incorporated and Apple Computer Incorporated. All Rights Reserved.
|
||||
/bd{bind def}bind def
|
||||
/ld{load def}bd
|
||||
/xs{exch store}bd
|
||||
/Z{0 def}bd
|
||||
/T true def
|
||||
/F false def
|
||||
/level2
|
||||
/languagelevel where
|
||||
{
|
||||
pop languagelevel 2 ge
|
||||
}{
|
||||
F
|
||||
}ifelse
|
||||
def
|
||||
/odictstk Z
|
||||
/oopstk Z
|
||||
/fcl
|
||||
{
|
||||
count oopstk sub dup 0 gt
|
||||
{
|
||||
{pop}repeat
|
||||
}{
|
||||
pop
|
||||
}ifelse
|
||||
countdictstack odictstk sub dup 0 gt
|
||||
{
|
||||
{end}repeat
|
||||
}{
|
||||
pop
|
||||
}ifelse
|
||||
}bd
|
||||
/sfcl2
|
||||
{
|
||||
/odictstk countdictstack store
|
||||
count/oopstk xs
|
||||
}bd
|
||||
/efcl2
|
||||
{
|
||||
stopped{$error/newerror F put}if
|
||||
fcl
|
||||
}bd
|
||||
/noload Z
|
||||
/startnoload
|
||||
{
|
||||
{/noload save store}if
|
||||
}bd
|
||||
/endnoload
|
||||
{
|
||||
{noload restore}if
|
||||
}bd
|
||||
/setcopies{
|
||||
level2
|
||||
{
|
||||
1 dict begin/NumCopies exch def currentdict end setpagedevice
|
||||
}{
|
||||
userdict/#copies 3 -1 roll put
|
||||
}ifelse
|
||||
}def
|
||||
level2 startnoload
|
||||
/ststpgdev{}def
|
||||
/dopgdev{}def
|
||||
/stpgdev{}def
|
||||
/buf Z
|
||||
/didstop T def
|
||||
/sfcl
|
||||
{
|
||||
/didstop T store
|
||||
/odictstk countdictstack store
|
||||
count/oopstk xs
|
||||
currentfile cvx stopped
|
||||
{
|
||||
$error/newerror F put
|
||||
didstop
|
||||
{
|
||||
save/didstop xs
|
||||
/buf vmstatus exch sub exch pop dup 0 lt{pop 0}if
|
||||
dup 64000 gt{pop 64000}if string store
|
||||
{
|
||||
currentfile buf readline
|
||||
{
|
||||
(}efcl)eq{exit}if
|
||||
}{
|
||||
/UnexpectedEOF errordict/rangecheck get exec
|
||||
}ifelse
|
||||
}loop
|
||||
didstop restore
|
||||
}if
|
||||
}if
|
||||
fcl
|
||||
}bd
|
||||
/efcl
|
||||
{
|
||||
/didstop F store
|
||||
exec
|
||||
stop
|
||||
}bd
|
||||
level2 endnoload level2 not startnoload
|
||||
/setpagedevice where{pop/realstpgdev/setpagedevice ld}if
|
||||
/SC_topddict Z
|
||||
/SC_spdict Z
|
||||
/$spusrdict F def
|
||||
/dopgdev
|
||||
{
|
||||
userdict/setpagedevice undef
|
||||
$spusrdict
|
||||
{
|
||||
userdict/setpagedevice/realstpgdev load put
|
||||
/$spusrdict F store
|
||||
}if
|
||||
SC_topddict realstpgdev
|
||||
}bd
|
||||
/stpgdev
|
||||
{
|
||||
SC_topddict dup 3 -1 roll
|
||||
{
|
||||
SC_spdict 2 index known
|
||||
{
|
||||
SC_spdict 2 index get
|
||||
dup 3 -1 roll
|
||||
{
|
||||
put dup
|
||||
}forall
|
||||
pop put dup
|
||||
}{
|
||||
put dup
|
||||
}ifelse
|
||||
}forall
|
||||
pop pop
|
||||
}bd
|
||||
/ststpgdev
|
||||
{
|
||||
/setpagedevice where
|
||||
{
|
||||
userdict eq
|
||||
{
|
||||
/$spusrdict T store
|
||||
}if
|
||||
}if
|
||||
userdict/setpagedevice/stpgdev load put
|
||||
/SC_topddict 0 dict store
|
||||
/SC_spdict 3 dict begin
|
||||
/InputAttributes 0 dict def
|
||||
/Policies 0 dict def
|
||||
/OutputAttributes 0 dict def
|
||||
currentdict
|
||||
end
|
||||
store
|
||||
}def
|
||||
/sfcl/sfcl2 ld
|
||||
/efcl/efcl2 ld
|
||||
level2 not endnoload
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_basic-4.0
|
||||
/xdf{exch def}bd
|
||||
/:L/lineto
|
||||
/lw/setlinewidth
|
||||
/:M/moveto
|
||||
/rl/rlineto
|
||||
/rm/rmoveto
|
||||
/:C/curveto
|
||||
/:T/translate
|
||||
/:K/closepath
|
||||
/:mf/makefont
|
||||
/gS/gsave
|
||||
/gR/grestore
|
||||
/np/newpath
|
||||
12{ld}repeat
|
||||
/framewidth -1 def
|
||||
/QDframwid -1 def
|
||||
/numframes Z
|
||||
/mTS matrix def
|
||||
/$m matrix def
|
||||
/av 87 def
|
||||
/por T def
|
||||
/normland F def
|
||||
/psb-nosave{}def
|
||||
/pse-nosave{}def
|
||||
/us Z
|
||||
/psb{/us save store}bd
|
||||
/pse{us restore}bd
|
||||
/level3
|
||||
/languagelevel where
|
||||
{
|
||||
pop languagelevel 3 ge
|
||||
}{
|
||||
F
|
||||
}ifelse
|
||||
def
|
||||
level2 startnoload
|
||||
/setjob
|
||||
{
|
||||
statusdict/jobname 3 -1 roll put
|
||||
}bd
|
||||
/devg/DeviceGray def
|
||||
/devr/DeviceRGB def
|
||||
/devc/DeviceCMYK def
|
||||
level2 endnoload level2 not startnoload
|
||||
/setjob
|
||||
{
|
||||
1 dict begin/JobName xdf currentdict end setuserparams
|
||||
}bd
|
||||
/devg[/DeviceGray]def
|
||||
/devr[/DeviceRGB]def
|
||||
/devc[/DeviceCMYK]def
|
||||
level2 not endnoload
|
||||
/pm Z
|
||||
/mT Z
|
||||
/sD Z
|
||||
/mTSsetup{
|
||||
mT $m currentmatrix mTS concatmatrix pop
|
||||
}bd
|
||||
/pmSVsetup{
|
||||
/pm save store
|
||||
}bd
|
||||
/initializepage
|
||||
{
|
||||
mT concat
|
||||
}bd
|
||||
/endp
|
||||
{
|
||||
pm restore
|
||||
}bd
|
||||
/adjRect
|
||||
{
|
||||
dup 2 mul 6 2 roll
|
||||
4 index sub exch 5 -1 roll sub exch
|
||||
4 2 roll
|
||||
4 index add exch 5 -1 roll add exch
|
||||
4 2 roll
|
||||
}bd
|
||||
/frame1up
|
||||
{
|
||||
gS
|
||||
mTS setmatrix
|
||||
QDframwid lw
|
||||
/setstrokeadjust where{pop T setstrokeadjust}if
|
||||
clippath pathbbox
|
||||
2 index sub exch
|
||||
3 index sub exch
|
||||
currentlinewidth framewidth mul
|
||||
adjRect
|
||||
numframes dup 0 lt{pop 0}if
|
||||
{
|
||||
4 copy
|
||||
rS
|
||||
currentlinewidth framewidth
|
||||
mul 4 mul
|
||||
adjRect
|
||||
}repeat
|
||||
pop pop pop pop
|
||||
gR
|
||||
}bd
|
||||
/$c devr def
|
||||
/rectclip where
|
||||
{
|
||||
pop/rC/rectclip ld
|
||||
}{
|
||||
/rC
|
||||
{
|
||||
np 4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
:K
|
||||
clip np
|
||||
}bd
|
||||
}ifelse
|
||||
/rectfill where
|
||||
{
|
||||
pop/rF/rectfill ld
|
||||
}{
|
||||
/rF
|
||||
{
|
||||
gS
|
||||
np
|
||||
4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
}ifelse
|
||||
/rectstroke where
|
||||
{
|
||||
pop/rS/rectstroke ld
|
||||
}{
|
||||
/rS
|
||||
{
|
||||
gS
|
||||
np
|
||||
4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
:K
|
||||
stroke
|
||||
gR
|
||||
}bd
|
||||
}ifelse
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_level1_colorspace-2.0
|
||||
/G/setgray ld
|
||||
/:F1/setgray ld
|
||||
/:F/setrgbcolor ld
|
||||
/:F4/setcmykcolor where
|
||||
{
|
||||
pop
|
||||
/setcmykcolor ld
|
||||
}{
|
||||
{
|
||||
3
|
||||
{
|
||||
dup
|
||||
3 -1 roll add
|
||||
dup 1 gt{pop 1}if
|
||||
1 exch sub
|
||||
4 1 roll
|
||||
}repeat
|
||||
pop
|
||||
setrgbcolor
|
||||
}bd
|
||||
}ifelse
|
||||
/:Fx
|
||||
{
|
||||
counttomark
|
||||
{0{G}0{:F}{:F4}}
|
||||
exch get
|
||||
exec
|
||||
pop
|
||||
}bd
|
||||
/$cs Z
|
||||
/:rg{devr :ss}bd
|
||||
/:sc{$cs :ss}bd
|
||||
/:dc
|
||||
{
|
||||
dup type/arraytype eq{0 get}if
|
||||
dup/DeviceCMYK eq
|
||||
{
|
||||
pop devc
|
||||
}{
|
||||
/DeviceGray eq
|
||||
{
|
||||
devg
|
||||
}{
|
||||
devr
|
||||
}ifelse
|
||||
}ifelse
|
||||
/$cs xdf
|
||||
}bd
|
||||
/:sgl{}def
|
||||
/:dr{}bd
|
||||
/:fCRD{pop}bd
|
||||
/:ckcs{}bd
|
||||
/:ss{/$c xdf}bd
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_uniform_graphics-2.0
|
||||
/@a
|
||||
{
|
||||
np :M 0 rl :L 0 exch rl 0 rl :L fill
|
||||
}bd
|
||||
/@b
|
||||
{
|
||||
np :M 0 rl 0 exch rl :L 0 rl 0 exch rl fill
|
||||
}bd
|
||||
/@c
|
||||
{
|
||||
moveto 0 rlineto stroke
|
||||
}bd
|
||||
/@w
|
||||
{
|
||||
moveto 0 exch rlineto stroke
|
||||
}bd
|
||||
/arct where
|
||||
{
|
||||
pop
|
||||
}{
|
||||
/arct
|
||||
{
|
||||
arcto pop pop pop pop
|
||||
}bd
|
||||
}ifelse
|
||||
/x1 Z
|
||||
/x2 Z
|
||||
/y1 Z
|
||||
/y2 Z
|
||||
/rad Z
|
||||
/@q
|
||||
{
|
||||
/rad xs
|
||||
/y2 xs
|
||||
/x2 xs
|
||||
/y1 xs
|
||||
/x1 xs
|
||||
np
|
||||
x2 x1 add 2 div y1 :M
|
||||
x2 y1 x2 y2 rad arct
|
||||
x2 y2 x1 y2 rad arct
|
||||
x1 y2 x1 y1 rad arct
|
||||
x1 y1 x2 y1 rad arct
|
||||
fill
|
||||
}bd
|
||||
/@s
|
||||
{
|
||||
/rad xs
|
||||
/y2 xs
|
||||
/x2 xs
|
||||
/y1 xs
|
||||
/x1 xs
|
||||
np
|
||||
x2 x1 add 2 div y1 :M
|
||||
x2 y1 x2 y2 rad arct
|
||||
x2 y2 x1 y2 rad arct
|
||||
x1 y2 x1 y1 rad arct
|
||||
x1 y1 x2 y1 rad arct
|
||||
:K
|
||||
stroke
|
||||
}bd
|
||||
/@i
|
||||
{
|
||||
np 0 360 arc fill
|
||||
}bd
|
||||
/@j
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
scale
|
||||
0 0 .5 0 360 arc
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
/@e
|
||||
{
|
||||
np
|
||||
0 360 arc
|
||||
:K
|
||||
stroke
|
||||
}bd
|
||||
/@f
|
||||
{
|
||||
np
|
||||
$m currentmatrix
|
||||
pop
|
||||
:T
|
||||
scale
|
||||
0 0 .5 0 360 arc
|
||||
:K
|
||||
$m setmatrix
|
||||
stroke
|
||||
}bd
|
||||
/@k
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
0 0 :M
|
||||
0 0 5 2 roll
|
||||
arc fill
|
||||
gR
|
||||
}bd
|
||||
/@l
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
0 0 :M
|
||||
scale
|
||||
0 0 .5 5 -2 roll arc
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
/@m
|
||||
{
|
||||
np
|
||||
arc
|
||||
stroke
|
||||
}bd
|
||||
/@n
|
||||
{
|
||||
np
|
||||
$m currentmatrix
|
||||
pop
|
||||
:T
|
||||
scale
|
||||
0 0 .5 5 -2 roll arc
|
||||
$m setmatrix
|
||||
stroke
|
||||
}bd
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_bubn-2.1
|
||||
/$t Z
|
||||
/$p Z
|
||||
/$s Z
|
||||
/$o 1. def
|
||||
/2state? F def
|
||||
/ps Z
|
||||
level2 startnoload
|
||||
/pushcolor/currentrgbcolor ld
|
||||
/popcolor/setrgbcolor ld
|
||||
/setcmykcolor where
|
||||
{
|
||||
pop/currentcmykcolor where
|
||||
{
|
||||
pop/pushcolor/currentcmykcolor ld
|
||||
/popcolor/setcmykcolor ld
|
||||
}if
|
||||
}if
|
||||
level2 endnoload level2 not startnoload
|
||||
/pushcolor
|
||||
{
|
||||
currentcolorspace $c eq
|
||||
{
|
||||
currentcolor currentcolorspace T
|
||||
}{
|
||||
currentcmykcolor F
|
||||
}ifelse
|
||||
}bd
|
||||
/popcolor
|
||||
{
|
||||
{
|
||||
setcolorspace setcolor
|
||||
}{
|
||||
setcmykcolor
|
||||
}ifelse
|
||||
}bd
|
||||
level2 not endnoload
|
||||
/pushstatic
|
||||
{
|
||||
2state?
|
||||
$o
|
||||
$t
|
||||
$p
|
||||
$s
|
||||
$cs
|
||||
ps
|
||||
}bd
|
||||
/popstatic
|
||||
{
|
||||
/ps xs
|
||||
/$cs xs
|
||||
/$s xs
|
||||
/$p xs
|
||||
/$t xs
|
||||
/$o xs
|
||||
/2state? xs
|
||||
}bd
|
||||
/pushgstate
|
||||
{
|
||||
currentpoint
|
||||
pushcolor
|
||||
currentlinewidth
|
||||
currentlinecap
|
||||
currentlinejoin
|
||||
currentdash exch aload length
|
||||
np clippath pathbbox
|
||||
$m currentmatrix aload pop
|
||||
}bd
|
||||
/popgstate
|
||||
{
|
||||
$m astore setmatrix
|
||||
2 index sub exch
|
||||
3 index sub exch
|
||||
rC
|
||||
array astore exch setdash
|
||||
setlinejoin
|
||||
setlinecap
|
||||
lw
|
||||
popcolor
|
||||
np :M
|
||||
}bd
|
||||
/bu
|
||||
{
|
||||
errordict/nocurrentpoint{pop 0 0}put
|
||||
2state?
|
||||
{
|
||||
pushgstate
|
||||
gR
|
||||
}if
|
||||
pushgstate
|
||||
gR
|
||||
pushgstate
|
||||
pushstatic
|
||||
pm restore
|
||||
mTS setmatrix
|
||||
}bd
|
||||
/bn
|
||||
{
|
||||
/pm save store
|
||||
popstatic
|
||||
popgstate
|
||||
gS
|
||||
popgstate
|
||||
2state?
|
||||
{
|
||||
gS
|
||||
popgstate
|
||||
}if
|
||||
}bd
|
||||
/cpat{pop 64 div setgray 8{pop}repeat}bd
|
||||
%%EndFile
|
||||
/currentpacking where {pop sc_oldpacking setpacking}if end
|
||||
%%EndProlog
|
||||
%%BeginSetup
|
||||
md begin
|
||||
%RBIIncludeNonPPDFeature: NumCopies 1
|
||||
%RBIBeginNonPPDFeature: WaitTimeout 600
|
||||
600/languagelevel where{pop languagelevel 2 ge}{false}ifelse{1 dict dup/WaitTimeout 4 -1 roll put setuserparams}{statusdict/waittimeout 3 -1 roll put}ifelse
|
||||
%RBIEndNonPPDFeature
|
||||
sfcl{
|
||||
%%BeginFeature: *HPColorAsGray No
|
||||
<< /ProcessColorModel /DeviceCMYK >> setpagedevice
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPIntent Colorimetric
|
||||
|
||||
|
||||
userdict /UserRenderIntent (RelativeColorimetric) put
|
||||
|
||||
<<>> setpagedevice
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPAutoScaling Off
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *PageSize Letter
|
||||
/HPDict /ProcSet findresource /SetMargins get [ 0 0 0 0 ] exch exec
|
@ -1,160 +0,0 @@
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *OutputMode Best
|
||||
|
||||
|
||||
<< /PostRenderingEnhance true
|
||||
|
||||
/PostRenderingEnhanceDetails
|
||||
|
||||
<< /PrintQuality 3
|
||||
|
||||
/Type 36 >>
|
||||
|
||||
>> systemdict /setpagedevice get exec
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPMaxDetail False
|
||||
|
||||
|
||||
<< /PostRenderingEnhance true
|
||||
|
||||
/PostRenderingEnhanceDetails
|
||||
|
||||
<< /MaxQualityResolution false
|
||||
|
||||
/Type 36 >>
|
||||
|
||||
>> systemdict /setpagedevice get exec
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *MirrorPrint False
|
||||
<</MirrorPrint false>>setpagedevice
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPTransverse False
|
||||
|
||||
|
||||
userdict /HPCustTrans known
|
||||
|
||||
{
|
||||
|
||||
(<<) cvx exec
|
||||
|
||||
/Orientation
|
||||
|
||||
userdict /HPCustTrans get
|
||||
|
||||
(>>) cvx exec setpagedevice
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
<</Orientation 0>> setpagedevice
|
||||
|
||||
} ifelse
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPPantone False
|
||||
|
||||
|
||||
/SpotColorMatching where {
|
||||
|
||||
pop
|
||||
|
||||
false SpotColorMatching
|
||||
|
||||
} if
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
|
||||
%%BeginFeature: *HPColorMan NoEmulation
|
||||
|
||||
|
||||
/CMYKColorManagement where {
|
||||
|
||||
pop
|
||||
|
||||
/None CMYKColorManagement
|
||||
|
||||
/None RGBColorManagement
|
||||
|
||||
} if
|
||||
%%EndFeature
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPCMYKEmulation None
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPRGBEmulation None
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPCyanBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPMagentaBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPYellowBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPBlackBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
(FOTOG4)setjob
|
@ -1,12 +0,0 @@
|
||||
%RBIIncludeStartNup
|
||||
/sD 16 dict def
|
||||
{/Courier findfont[10 0 0 -10 0 0]:mf setfont}stopped{$error/newerror F put}if
|
||||
%%EndSetup
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
%RBIIncludePageSlotInvocation
|
||||
mTSsetup
|
||||
pmSVsetup
|
||||
initializepage
|
||||
(FOTOG4; page: 1 of 1)setjob
|
||||
%%EndPageSetup
|
@ -1,76 +0,0 @@
|
||||
11 -30000 -29999.5 @c
|
||||
-29990 -30000 :M
|
||||
psb
|
||||
gsave %% Print PostScript gsave
|
||||
/hascolor
|
||||
/deviceinfo where
|
||||
{pop deviceinfo /Colors known
|
||||
{deviceinfo /Colors get exec 1 gt}
|
||||
{false} ifelse}
|
||||
{/statusdict where
|
||||
{pop statusdict /processcolors known
|
||||
{statusdict /processcolors get exec 1 gt}
|
||||
{false} ifelse}
|
||||
{false} ifelse}
|
||||
ifelse
|
||||
def
|
||||
40 dict begin
|
||||
/_image systemdict /image get def
|
||||
/_setgray systemdict /setgray get def
|
||||
/_currentgray systemdict /currentgray get def
|
||||
/_settransfer systemdict /settransfer get def
|
||||
/_currenttransfer systemdict /currenttransfer get def
|
||||
/blank 0 _currenttransfer exec
|
||||
1 _currenttransfer exec eq def
|
||||
/negative blank
|
||||
{0 _currenttransfer exec 0.5 lt}
|
||||
{0 _currenttransfer exec 1 _currenttransfer exec gt}
|
||||
ifelse def
|
||||
/inverted? negative def
|
||||
/level2 systemdict /languagelevel known
|
||||
{languagelevel 2 ge} {false} ifelse def
|
||||
/level3 systemdict /languagelevel known
|
||||
{languagelevel 3 ge} {false} ifelse def
|
||||
/foureq {4 index eq 8 1 roll
|
||||
4 index eq 8 1 roll
|
||||
4 index eq 8 1 roll
|
||||
4 index eq 8 1 roll
|
||||
pop pop pop pop and and and} def
|
||||
hascolor {/band 0 def} {/band 5 def} ifelse
|
||||
/setcmykcolor where {pop
|
||||
1 0 0 0 setcmykcolor _currentgray 1 exch sub
|
||||
0 1 0 0 setcmykcolor _currentgray 1 exch sub
|
||||
0 0 1 0 setcmykcolor _currentgray 1 exch sub
|
||||
0 0 0 1 setcmykcolor _currentgray 1 exch sub
|
||||
4 {4 copy} repeat
|
||||
1 0 0 0 foureq {/band 1 store} if
|
||||
0 1 0 0 foureq {/band 2 store} if
|
||||
0 0 1 0 foureq {/band 3 store} if
|
||||
0 0 0 1 foureq {/band 4 store} if
|
||||
0 0 0 0 foureq {/band 6 store} if} if
|
||||
blank {/band 6 store} if
|
||||
blank not {
|
||||
{} bind
|
||||
{} bind
|
||||
{} bind
|
||||
{} bind
|
||||
/__settransfer {{dummy1 exec dummy2 exec}
|
||||
dup 0 4 -1 roll put dup 2 _currenttransfer put
|
||||
_settransfer} def
|
||||
band 0 eq {
|
||||
systemdict /currentcolortransfer get exec
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 11 -1 roll put dup 2 7 -1 roll put
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 10 -1 roll put dup 2 7 -1 roll put
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 9 -1 roll put dup 2 7 -1 roll put
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 8 -1 roll put dup 2 7 -1 roll put
|
||||
systemdict /setcolortransfer get exec} if
|
||||
band 1 eq {pop pop pop __settransfer} if
|
||||
band 2 eq {pop pop __settransfer pop} if
|
||||
band 3 eq {pop __settransfer pop pop} if
|
||||
band 4 ge {__settransfer pop pop pop} if
|
||||
} if
|
||||
gsave % Image Header gsave
|
@ -1,101 +0,0 @@
|
||||
level2 {
|
||||
band 0 eq {
|
||||
/DeviceCMYK
|
||||
} {/DeviceGray} ifelse
|
||||
setcolorspace currentdict /PhotoshopDuotoneColorSpace undef currentdict /PhotoshopDuotoneAltColorSpace undef } if
|
||||
/picstr1 cols string def
|
||||
/picstr2 cols string def
|
||||
/picstr3 cols string def
|
||||
/picstr4 cols string def
|
||||
/picstr5 cols string def
|
||||
/_rowpadstr cols string def
|
||||
/rawreaddata {currentfile exch readhexstring pop} def
|
||||
/padreaddata { _topPad 0 gt { /_topPad _topPad 1 sub def pop _rowpadstr }
|
||||
{ _subImageRows 0 gt { /_subImageRows _subImageRows 1 sub def
|
||||
dup _leftPad _picsubstr rawreaddata putinterval }
|
||||
{ pop _rowpadstr } ifelse } ifelse } def
|
||||
/image2 level2 {/image load def} {{begin
|
||||
Width Height BitsPerComponent ImageMatrix
|
||||
Decode length 2 eq
|
||||
{/DataSource load image} if
|
||||
Decode length 6 eq
|
||||
{DataSource 0 get DataSource 1 get DataSource 2 get
|
||||
true 3 colorimage} if
|
||||
Decode length 8 eq
|
||||
{DataSource 0 get DataSource 1 get
|
||||
DataSource 2 get DataSource 3 get
|
||||
true 4 colorimage} if
|
||||
end} def} ifelse
|
||||
/_image2 level2 {/_image load def} {{begin
|
||||
Width Height BitsPerComponent ImageMatrix
|
||||
/DataSource load _image end} def} ifelse
|
||||
/beginimage {
|
||||
band 0 eq band 5 eq or
|
||||
{image2} if
|
||||
band 1 ge band 4 le and
|
||||
{{1 exch sub dummy exec} dup 3 _currenttransfer put
|
||||
_settransfer _image2} if
|
||||
band 6 eq
|
||||
{negative {{pop 0}} {{pop 1}} ifelse
|
||||
_settransfer _image2} if
|
||||
} def
|
||||
/readdata /rawreaddata load bind def
|
||||
12 dict begin
|
||||
/ImageType 1 def
|
||||
/Width cols def
|
||||
/Height rows def
|
||||
/ImageMatrix [cols 0 0 rows 0 0] def
|
||||
/BitsPerComponent 8 def
|
||||
band 0 eq
|
||||
{/Decode [0 1 0 1 0 1 0 1] def}
|
||||
{/Decode [0 1] def} ifelse
|
||||
band 0 eq {
|
||||
/MultipleDataSources true def
|
||||
/DataSource [
|
||||
{picstr1 readdata}
|
||||
{picstr2 readdata}
|
||||
{picstr3 readdata}
|
||||
{picstr4 readdata picstr5 readdata pop}
|
||||
] def} if
|
||||
band 1 eq {
|
||||
/DataSource {
|
||||
picstr1 readdata
|
||||
picstr2 readdata pop
|
||||
picstr3 readdata pop
|
||||
picstr4 readdata pop
|
||||
picstr5 readdata pop
|
||||
} def} if
|
||||
band 2 eq {
|
||||
/DataSource {
|
||||
picstr1 readdata pop
|
||||
picstr2 readdata
|
||||
picstr3 readdata pop
|
||||
picstr4 readdata pop
|
||||
picstr5 readdata pop
|
||||
} def} if
|
||||
band 3 eq {
|
||||
/DataSource {
|
||||
picstr1 readdata pop
|
||||
picstr2 readdata pop
|
||||
picstr3 readdata
|
||||
picstr4 readdata pop
|
||||
picstr5 readdata pop
|
||||
} def} if
|
||||
band 4 eq {
|
||||
/DataSource {
|
||||
picstr1 readdata pop
|
||||
picstr2 readdata pop
|
||||
picstr3 readdata pop
|
||||
picstr4 readdata
|
||||
picstr5 readdata pop
|
||||
} def} if
|
||||
band 5 ge {
|
||||
/DataSource {
|
||||
picstr1 readdata pop
|
||||
picstr2 readdata pop
|
||||
picstr3 readdata pop
|
||||
picstr4 readdata pop
|
||||
picstr5 readdata
|
||||
} def} if
|
||||
currentdict end
|
||||
beginimage
|
@ -1,10 +0,0 @@
|
||||
grestore end % Image Trailer grestore
|
||||
grestore % Print PostScript grestore
|
||||
pse
|
||||
endp
|
||||
showpage
|
||||
%%PageTrailer
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
@ -1,14 +0,0 @@
|
||||
vips2djlabpsbitsdir = $(datadir)/vips/vips2dj/lab
|
||||
|
||||
vips2djlabpsbits_DATA = \
|
||||
head1 \
|
||||
head2 \
|
||||
head3 \
|
||||
head4 \
|
||||
head5 \
|
||||
head6
|
||||
|
||||
install-exec-hook:
|
||||
$(mkinstalldirs) $(DESTDIR)$(vips2djlabpsbitsdir)
|
||||
|
||||
EXTRA_DIST = $(vips2djlabpsbits_DATA)
|
@ -1,600 +0,0 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Title: (Lab_example)
|
||||
%%Creator: (Adobe Photoshop\250 4.0: PSPrinter 8.3.1)
|
||||
%%CreationDate: (12:54 martes, 5 agosto 1997)
|
||||
%%For: (Johan Lammens)
|
||||
%%Pages: 1
|
||||
%%DocumentFonts:
|
||||
%%DocumentNeededFonts:
|
||||
%%DocumentSuppliedFonts:
|
||||
%%DocumentData: Clean7Bit
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%DocumentMedia: Default 612 792 0 () ()
|
||||
%ADO_ImageableArea: 51 77 561 715
|
||||
%%EndComments
|
||||
%%BeginDefaults
|
||||
%%ViewingOrientation: 1 0 0 1
|
||||
%%EndDefaults
|
||||
userdict begin/dscInfo 5 dict dup begin
|
||||
/Title(Lab_example)def
|
||||
/Creator(Adobe Photoshop\250 4.0: PSPrinter 8.3.1)def
|
||||
/CreationDate(12:54 martes, 5 agosto 1997)def
|
||||
/For(Johan Lammens)def
|
||||
/Pages 1 def
|
||||
end def end
|
||||
/md 163 dict def md begin/currentpacking where {pop /sc_oldpacking currentpacking def true setpacking}if
|
||||
%%BeginFile: adobe_psp_basic
|
||||
%%Copyright: Copyright 1990-1996 Adobe Systems Incorporated. All Rights Reserved.
|
||||
/bd{bind def}bind def
|
||||
/xdf{exch def}bd
|
||||
/xs{exch store}bd
|
||||
/ld{load def}bd
|
||||
/Z{0 def}bd
|
||||
/T/true
|
||||
/F/false
|
||||
/:L/lineto
|
||||
/lw/setlinewidth
|
||||
/:M/moveto
|
||||
/rl/rlineto
|
||||
/rm/rmoveto
|
||||
/:C/curveto
|
||||
/:T/translate
|
||||
/:K/closepath
|
||||
/:mf/makefont
|
||||
/gS/gsave
|
||||
/gR/grestore
|
||||
/np/newpath
|
||||
14{ld}repeat
|
||||
/$m matrix def
|
||||
/av 83 def
|
||||
/por true def
|
||||
/normland false def
|
||||
/psb-nosave{}bd
|
||||
/pse-nosave{}bd
|
||||
/us Z
|
||||
/psb{/us save store}bd
|
||||
/pse{us restore}bd
|
||||
/level2
|
||||
/languagelevel where
|
||||
{
|
||||
pop languagelevel 2 ge
|
||||
}{
|
||||
false
|
||||
}ifelse
|
||||
def
|
||||
/featurecleanup
|
||||
{
|
||||
stopped
|
||||
cleartomark
|
||||
countdictstack exch sub dup 0 gt
|
||||
{
|
||||
{end}repeat
|
||||
}{
|
||||
pop
|
||||
}ifelse
|
||||
}bd
|
||||
/noload Z
|
||||
/startnoload
|
||||
{
|
||||
{/noload save store}if
|
||||
}bd
|
||||
/endnoload
|
||||
{
|
||||
{noload restore}if
|
||||
}bd
|
||||
level2 startnoload
|
||||
/setjob
|
||||
{
|
||||
statusdict/jobname 3 -1 roll put
|
||||
}bd
|
||||
/setcopies
|
||||
{
|
||||
userdict/#copies 3 -1 roll put
|
||||
}bd
|
||||
level2 endnoload level2 not startnoload
|
||||
/setjob
|
||||
{
|
||||
1 dict begin/JobName xdf currentdict end setuserparams
|
||||
}bd
|
||||
/setcopies
|
||||
{
|
||||
1 dict begin/NumCopies xdf currentdict end setpagedevice
|
||||
}bd
|
||||
level2 not endnoload
|
||||
/pm Z
|
||||
/mT Z
|
||||
/sD Z
|
||||
/realshowpage Z
|
||||
/initializepage
|
||||
{
|
||||
/pm save store mT concat
|
||||
}bd
|
||||
/endp
|
||||
{
|
||||
pm restore showpage
|
||||
}def
|
||||
/endp1
|
||||
{
|
||||
pm restore
|
||||
}def
|
||||
/endp2
|
||||
{
|
||||
showpage
|
||||
}def
|
||||
/$c/DeviceRGB def
|
||||
/rectclip where
|
||||
{
|
||||
pop/rC/rectclip ld
|
||||
}{
|
||||
/rC
|
||||
{
|
||||
np 4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
:K
|
||||
clip np
|
||||
}bd
|
||||
}ifelse
|
||||
/rectfill where
|
||||
{
|
||||
pop/rF/rectfill ld
|
||||
}{
|
||||
/rF
|
||||
{
|
||||
gS
|
||||
np
|
||||
4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
}ifelse
|
||||
/rectstroke where
|
||||
{
|
||||
pop/rS/rectstroke ld
|
||||
}{
|
||||
/rS
|
||||
{
|
||||
gS
|
||||
np
|
||||
4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
:K
|
||||
stroke
|
||||
gR
|
||||
}bd
|
||||
}ifelse
|
||||
%%EndFile
|
||||
%%BeginFile: adobe_psp_colorspace_level1
|
||||
%%Copyright: Copyright 1991-1996 Adobe Systems Incorporated. All Rights Reserved.
|
||||
/G/setgray ld
|
||||
/:F1/setgray ld
|
||||
/:F/setrgbcolor ld
|
||||
/:F4/setcmykcolor where
|
||||
{
|
||||
pop
|
||||
/setcmykcolor ld
|
||||
}{
|
||||
{
|
||||
3
|
||||
{
|
||||
dup
|
||||
3 -1 roll add
|
||||
dup 1 gt{pop 1}if
|
||||
1 exch sub
|
||||
4 1 roll
|
||||
}repeat
|
||||
pop
|
||||
setrgbcolor
|
||||
}bd
|
||||
}ifelse
|
||||
/:Fx
|
||||
{
|
||||
counttomark
|
||||
{0{G}0{:F}{:F4}}
|
||||
exch get
|
||||
exec
|
||||
pop
|
||||
}bd
|
||||
/:rg{/DeviceRGB :ss}bd
|
||||
/:sc{$cs :ss}bd
|
||||
/:dc{/$cs xdf}bd
|
||||
/:sgl{}def
|
||||
/:dr{}bd
|
||||
/:nmCRD{pop}bd
|
||||
/:fCRD{pop}bd
|
||||
/:ckcs{}bd
|
||||
/:ss{/$c xdf}bd
|
||||
/$cs Z
|
||||
%%EndFile
|
||||
%%BeginFile: adobe_psp_uniform_graphics
|
||||
%%Copyright: Copyright 1990-1996 Adobe Systems Incorporated. All Rights Reserved.
|
||||
/@a
|
||||
{
|
||||
np :M 0 rl :L 0 exch rl 0 rl :L fill
|
||||
}bd
|
||||
/@b
|
||||
{
|
||||
np :M 0 rl 0 exch rl :L 0 rl 0 exch rl fill
|
||||
}bd
|
||||
/@c
|
||||
{
|
||||
moveto lineto stroke
|
||||
}bd
|
||||
/arct where
|
||||
{
|
||||
pop
|
||||
}{
|
||||
/arct
|
||||
{
|
||||
arcto pop pop pop pop
|
||||
}bd
|
||||
}ifelse
|
||||
/x1 Z
|
||||
/x2 Z
|
||||
/y1 Z
|
||||
/y2 Z
|
||||
/rad Z
|
||||
/@q
|
||||
{
|
||||
/rad xs
|
||||
/y2 xs
|
||||
/x2 xs
|
||||
/y1 xs
|
||||
/x1 xs
|
||||
np
|
||||
x2 x1 add 2 div y1 :M
|
||||
x2 y1 x2 y2 rad arct
|
||||
x2 y2 x1 y2 rad arct
|
||||
x1 y2 x1 y1 rad arct
|
||||
x1 y1 x2 y1 rad arct
|
||||
fill
|
||||
}bd
|
||||
/@s
|
||||
{
|
||||
/rad xs
|
||||
/y2 xs
|
||||
/x2 xs
|
||||
/y1 xs
|
||||
/x1 xs
|
||||
np
|
||||
x2 x1 add 2 div y1 :M
|
||||
x2 y1 x2 y2 rad arct
|
||||
x2 y2 x1 y2 rad arct
|
||||
x1 y2 x1 y1 rad arct
|
||||
x1 y1 x2 y1 rad arct
|
||||
:K
|
||||
stroke
|
||||
}bd
|
||||
/@i
|
||||
{
|
||||
np 0 360 arc fill
|
||||
}bd
|
||||
/@j
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
scale
|
||||
0 0 .5 0 360 arc
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
/@e
|
||||
{
|
||||
np
|
||||
0 360 arc
|
||||
:K
|
||||
stroke
|
||||
}bd
|
||||
/@f
|
||||
{
|
||||
np
|
||||
$m currentmatrix
|
||||
pop
|
||||
:T
|
||||
scale
|
||||
0 0 .5 0 360 arc
|
||||
:K
|
||||
$m setmatrix
|
||||
stroke
|
||||
}bd
|
||||
/@k
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
0 0 :M
|
||||
0 0 5 2 roll
|
||||
arc fill
|
||||
gR
|
||||
}bd
|
||||
/@l
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
0 0 :M
|
||||
scale
|
||||
0 0 .5 5 -2 roll arc
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
/@m
|
||||
{
|
||||
np
|
||||
arc
|
||||
stroke
|
||||
}bd
|
||||
/@n
|
||||
{
|
||||
np
|
||||
$m currentmatrix
|
||||
pop
|
||||
:T
|
||||
scale
|
||||
0 0 .5 5 -2 roll arc
|
||||
$m setmatrix
|
||||
stroke
|
||||
}bd
|
||||
%%EndFile
|
||||
%%BeginFile: adobe_psp_customps
|
||||
%%Copyright: Copyright 1990-1996 Adobe Systems Incorporated. All Rights Reserved.
|
||||
/$t Z
|
||||
/$p Z
|
||||
/$s Z
|
||||
/$o 1. def
|
||||
/2state? false def
|
||||
/ps Z
|
||||
level2 startnoload
|
||||
/pushcolor/currentrgbcolor ld
|
||||
/popcolor/setrgbcolor ld
|
||||
/setcmykcolor where
|
||||
{
|
||||
pop/currentcmykcolor where
|
||||
{
|
||||
pop/pushcolor/currentcmykcolor ld
|
||||
/popcolor/setcmykcolor ld
|
||||
}if
|
||||
}if
|
||||
level2 endnoload level2 not startnoload
|
||||
/pushcolor
|
||||
{
|
||||
currentcolorspace $c eq
|
||||
{
|
||||
currentcolor currentcolorspace true
|
||||
}{
|
||||
currentcmykcolor false
|
||||
}ifelse
|
||||
}bd
|
||||
/popcolor
|
||||
{
|
||||
{
|
||||
setcolorspace setcolor
|
||||
}{
|
||||
setcmykcolor
|
||||
}ifelse
|
||||
}bd
|
||||
level2 not endnoload
|
||||
/pushstatic
|
||||
{
|
||||
ps
|
||||
2state?
|
||||
$o
|
||||
$t
|
||||
$p
|
||||
$s
|
||||
$cs
|
||||
}bd
|
||||
/popstatic
|
||||
{
|
||||
/$cs xs
|
||||
/$s xs
|
||||
/$p xs
|
||||
/$t xs
|
||||
/$o xs
|
||||
/2state? xs
|
||||
/ps xs
|
||||
}bd
|
||||
/pushgstate
|
||||
{
|
||||
save errordict/nocurrentpoint{pop 0 0}put
|
||||
currentpoint
|
||||
3 -1 roll restore
|
||||
pushcolor
|
||||
currentlinewidth
|
||||
currentlinecap
|
||||
currentlinejoin
|
||||
currentdash exch aload length
|
||||
np clippath pathbbox
|
||||
$m currentmatrix aload pop
|
||||
}bd
|
||||
/popgstate
|
||||
{
|
||||
$m astore setmatrix
|
||||
2 index sub exch
|
||||
3 index sub exch
|
||||
rC
|
||||
array astore exch setdash
|
||||
setlinejoin
|
||||
setlinecap
|
||||
lw
|
||||
popcolor
|
||||
np :M
|
||||
}bd
|
||||
/bu
|
||||
{
|
||||
pushgstate
|
||||
gR
|
||||
pushgstate
|
||||
2state?
|
||||
{
|
||||
gR
|
||||
pushgstate
|
||||
}if
|
||||
pushstatic
|
||||
pm restore
|
||||
mT concat
|
||||
}bd
|
||||
/bn
|
||||
{
|
||||
/pm save store
|
||||
popstatic
|
||||
popgstate
|
||||
gS
|
||||
popgstate
|
||||
2state?
|
||||
{
|
||||
gS
|
||||
popgstate
|
||||
}if
|
||||
}bd
|
||||
/cpat{pop 64 div setgray 8{pop}repeat}bd
|
||||
%%EndFile
|
||||
%%BeginFile: adobe_psp_basic_text
|
||||
%%Copyright: Copyright 1990-1996 Adobe Systems Incorporated. All Rights Reserved.
|
||||
/S/show ld
|
||||
/A{
|
||||
0.0 exch ashow
|
||||
}bd
|
||||
/R{
|
||||
0.0 exch 32 exch widthshow
|
||||
}bd
|
||||
/W{
|
||||
0.0 3 1 roll widthshow
|
||||
}bd
|
||||
/J{
|
||||
0.0 32 4 2 roll 0.0 exch awidthshow
|
||||
}bd
|
||||
/V{
|
||||
0.0 4 1 roll 0.0 exch awidthshow
|
||||
}bd
|
||||
/fcflg true def
|
||||
/fc{
|
||||
fcflg{
|
||||
vmstatus exch sub 50000 lt{
|
||||
(%%[ Warning: Running out of memory ]%%\r)print flush/fcflg false store
|
||||
}if pop
|
||||
}if
|
||||
}bd
|
||||
/$f[1 0 0 -1 0 0]def
|
||||
/:ff{$f :mf}bd
|
||||
/MacEncoding StandardEncoding 256 array copy def
|
||||
MacEncoding 39/quotesingle put
|
||||
MacEncoding 96/grave put
|
||||
/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute
|
||||
/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave
|
||||
/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute
|
||||
/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis
|
||||
/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
|
||||
/registered/copyright/trademark/acute/dieresis/notequal/AE/Oslash
|
||||
/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation
|
||||
/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash
|
||||
/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft
|
||||
/guillemotright/ellipsis/space/Agrave/Atilde/Otilde/OE/oe
|
||||
/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge
|
||||
/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl
|
||||
/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand
|
||||
/Acircumflex/Ecircumflex/Aacute/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave
|
||||
/Oacute/Ocircumflex/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde
|
||||
/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron
|
||||
MacEncoding 128 128 getinterval astore pop
|
||||
level2 startnoload
|
||||
/copyfontdict
|
||||
{
|
||||
findfont dup length dict
|
||||
begin
|
||||
{
|
||||
1 index/FID ne{def}{pop pop}ifelse
|
||||
}forall
|
||||
}bd
|
||||
level2 endnoload level2 not startnoload
|
||||
/copyfontdict
|
||||
{
|
||||
findfont dup length dict
|
||||
copy
|
||||
begin
|
||||
}bd
|
||||
level2 not endnoload
|
||||
md/fontname known not{
|
||||
/fontname/customfont def
|
||||
}if
|
||||
/Encoding Z
|
||||
/:mre
|
||||
{
|
||||
copyfontdict
|
||||
/Encoding MacEncoding def
|
||||
fontname currentdict
|
||||
end
|
||||
definefont :ff def
|
||||
}bd
|
||||
/:bsr
|
||||
{
|
||||
copyfontdict
|
||||
/Encoding Encoding 256 array copy def
|
||||
Encoding dup
|
||||
}bd
|
||||
/pd{put dup}bd
|
||||
/:esr
|
||||
{
|
||||
pop pop
|
||||
fontname currentdict
|
||||
end
|
||||
definefont :ff def
|
||||
}bd
|
||||
/scf
|
||||
{
|
||||
scalefont def
|
||||
}bd
|
||||
/scf-non
|
||||
{
|
||||
$m scale :mf setfont
|
||||
}bd
|
||||
/ps Z
|
||||
/fz{/ps xs}bd
|
||||
/sf/setfont ld
|
||||
/cF/currentfont ld
|
||||
/mbf
|
||||
{
|
||||
/makeblendedfont where
|
||||
{
|
||||
pop
|
||||
makeblendedfont
|
||||
/ABlend exch definefont
|
||||
}{
|
||||
pop
|
||||
}ifelse
|
||||
def
|
||||
}def
|
||||
%%EndFile
|
||||
/currentpacking where {pop sc_oldpacking setpacking}if end
|
||||
%%EndProlog
|
||||
%%BeginSetup
|
||||
md begin
|
||||
countdictstack[{
|
||||
%%BeginFeature: *InputSlot OnlyOne
|
||||
|
||||
%%EndFeature
|
||||
}featurecleanup
|
||||
countdictstack[{
|
||||
%%BeginFeature: *InstalledMemory standard
|
||||
|
||||
%%EndFeature
|
||||
}featurecleanup
|
||||
countdictstack[{
|
||||
%%BeginFeature: *HPIntent Colorimetric
|
||||
userdict /UserRenderIntent (Colorimetric) put
|
||||
<<>> setpagedevice
|
||||
%%EndFeature
|
||||
}featurecleanup
|
||||
countdictstack[{
|
||||
%%BeginFeature: *PageRegion Letter
|
@ -1,3 +0,0 @@
|
||||
%%EndFeature
|
||||
}featurecleanup
|
||||
(Johan Lammens; document: Lab_example)setjob
|
@ -1,9 +0,0 @@
|
||||
/sD 16 dict def
|
||||
300 level2{1 dict dup/WaitTimeout 4 -1 roll put setuserparams}{statusdict/waittimeout 3 -1 roll put}ifelse
|
||||
/Courier findfont[10 0 0 -10 0 0]:mf setfont
|
||||
%%EndSetup
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
initializepage
|
||||
(Johan Lammens; document: Lab_example; page: 1 of 1)setjob
|
||||
%%EndPageSetup
|
@ -1,71 +0,0 @@
|
||||
-30000 -29999 -1 1 -29989 -30000 1 -30000 -30000 @a
|
||||
-30000 -30000 :M
|
||||
psb
|
||||
gsave
|
||||
/hascolor
|
||||
/deviceinfo where
|
||||
{pop deviceinfo /Colors known
|
||||
{deviceinfo /Colors get exec 1 gt}
|
||||
{false} ifelse}
|
||||
{/statusdict where
|
||||
{pop statusdict /processcolors known
|
||||
{statusdict /processcolors get exec 1 gt}
|
||||
{false} ifelse}
|
||||
{false} ifelse}
|
||||
ifelse
|
||||
def
|
||||
40 dict begin
|
||||
/_image systemdict /image get def
|
||||
/_setgray systemdict /setgray get def
|
||||
/_currentgray systemdict /currentgray get def
|
||||
/_settransfer systemdict /settransfer get def
|
||||
/_currenttransfer systemdict /currenttransfer get def
|
||||
/blank 0 _currenttransfer exec
|
||||
1 _currenttransfer exec eq def
|
||||
/negative blank
|
||||
{0 _currenttransfer exec 0.5 lt}
|
||||
{0 _currenttransfer exec 1 _currenttransfer exec gt}
|
||||
ifelse def
|
||||
/inverted? negative def
|
||||
/level2 systemdict /languagelevel known
|
||||
{languagelevel 2 ge} {false} ifelse def
|
||||
/foureq {4 index eq 8 1 roll
|
||||
4 index eq 8 1 roll
|
||||
4 index eq 8 1 roll
|
||||
4 index eq 8 1 roll
|
||||
pop pop pop pop and and and} def
|
||||
hascolor {/band 0 def} {/band 5 def} ifelse
|
||||
/setcmykcolor where {pop
|
||||
1 0 0 0 setcmykcolor _currentgray 1 exch sub
|
||||
0 1 0 0 setcmykcolor _currentgray 1 exch sub
|
||||
0 0 1 0 setcmykcolor _currentgray 1 exch sub
|
||||
0 0 0 1 setcmykcolor _currentgray 1 exch sub
|
||||
4 {4 copy} repeat
|
||||
1 0 0 0 foureq {/band 1 store} if
|
||||
0 1 0 0 foureq {/band 2 store} if
|
||||
0 0 1 0 foureq {/band 3 store} if
|
||||
0 0 0 1 foureq {/band 4 store} if
|
||||
0 0 0 0 foureq {/band 6 store} if} if
|
||||
blank {/band 6 store} if
|
||||
blank not {
|
||||
{} bind
|
||||
{} bind
|
||||
{} bind
|
||||
{} bind
|
||||
/__settransfer {{dummy1 exec dummy2 exec}
|
||||
dup 0 4 -1 roll put dup 2 _currenttransfer put
|
||||
_settransfer} def
|
||||
band 0 eq {
|
||||
systemdict /currentcolortransfer get exec
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 11 -1 roll put dup 2 7 -1 roll put
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 10 -1 roll put dup 2 7 -1 roll put
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 9 -1 roll put dup 2 7 -1 roll put
|
||||
{dummy1 exec dummy2 exec}
|
||||
dup 0 8 -1 roll put dup 2 7 -1 roll put
|
||||
systemdict /setcolortransfer get exec} if
|
||||
band 0 ne {__settransfer pop pop pop} if
|
||||
} if
|
||||
gsave
|
@ -1,70 +0,0 @@
|
||||
level2 {
|
||||
band 0 eq {
|
||||
[/CIEBasedABC 5 dict begin
|
||||
/RangeABC [0 100 -128 127 -128 127] def
|
||||
/DecodeABC [{16 add 116 div} bind
|
||||
{500 div} bind {200 div} bind] def
|
||||
/MatrixABC [1 1 1 1 0 0 0 0 -1] def
|
||||
/DecodeLMN [
|
||||
{dup 6 29 div ge {dup dup mul mul}
|
||||
{4 29 div sub 108 841 div mul}
|
||||
ifelse 0.9505 mul} bind
|
||||
{dup 6 29 div ge {dup dup mul mul}
|
||||
{4 29 div sub 108 841 div mul}
|
||||
ifelse} bind
|
||||
{dup 6 29 div ge {dup dup mul mul}
|
||||
{4 29 div sub 108 841 div mul}
|
||||
ifelse 1.0890 mul} bind
|
||||
] def
|
||||
/WhitePoint [0.9505 1 1.0890] def
|
||||
currentdict end]
|
||||
} {/DeviceGray} ifelse
|
||||
setcolorspace} if
|
||||
/picstr1 cols string def
|
||||
/picstr2 cols string def
|
||||
/picstr3 cols string def
|
||||
/readdata {currentfile exch readhexstring pop} def
|
||||
/image2 level2 {/image load def} {{begin
|
||||
Width Height BitsPerComponent ImageMatrix
|
||||
Decode length 2 eq
|
||||
{/DataSource load image} if
|
||||
Decode length 6 eq
|
||||
{DataSource 0 get DataSource 1 get DataSource 2 get
|
||||
true 3 colorimage} if
|
||||
Decode length 8 eq
|
||||
{DataSource 0 get DataSource 1 get
|
||||
DataSource 2 get DataSource 3 get
|
||||
true 4 colorimage} if
|
||||
end} def} ifelse
|
||||
/_image2 level2 {/_image load def} {{begin
|
||||
Width Height BitsPerComponent ImageMatrix
|
||||
/DataSource load _image end} def} ifelse
|
||||
/beginimage {
|
||||
band 0 eq band 4 eq or band 5 eq or
|
||||
{image2}
|
||||
{negative {{pop 0}} {{pop 1}} ifelse
|
||||
_settransfer _image2} ifelse
|
||||
} def
|
||||
12 dict begin
|
||||
/ImageType 1 def
|
||||
/Width cols def
|
||||
/Height rows def
|
||||
/ImageMatrix [cols 0 0 rows 0 0] def
|
||||
/BitsPerComponent 8 def
|
||||
band 0 eq level2 and
|
||||
{/Decode [0 100 -128 127 -128 127] def
|
||||
/MultipleDataSources true def
|
||||
/DataSource [
|
||||
{picstr1 readdata}
|
||||
{picstr2 readdata}
|
||||
{picstr3 readdata}
|
||||
] def}
|
||||
{/Decode [0 1] def
|
||||
/DataSource {
|
||||
picstr1 readdata
|
||||
picstr2 readdata pop
|
||||
picstr3 readdata pop
|
||||
} def}
|
||||
ifelse
|
||||
currentdict end
|
||||
beginimage
|
@ -1,9 +0,0 @@
|
||||
|
||||
grestore end
|
||||
grestore
|
||||
pse
|
||||
endp
|
||||
%%PageTrailer
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
@ -1,14 +0,0 @@
|
||||
vips2djmonopsbitsdir = $(datadir)/vips/vips2dj/mono
|
||||
|
||||
vips2djmonopsbits_DATA = \
|
||||
head1 \
|
||||
head2 \
|
||||
head3 \
|
||||
head4 \
|
||||
head5 \
|
||||
head6
|
||||
|
||||
install-exec-hook:
|
||||
$(mkinstalldirs) $(DESTDIR)$(vips2djmonopsbitsdir)
|
||||
|
||||
EXTRA_DIST = $(vips2djmonopsbits_DATA)
|
@ -1,686 +0,0 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Title: (Untitled-1)
|
||||
%%Creator: (Adobe\250 Photoshop\250 6.0: AdobePS 8.7.0)
|
||||
%%CreationDate: (3:00 pm Tuesday, April 30, 2002)
|
||||
%%For: (FOTOG4)
|
||||
%%Routing: (mailto:Colin.White@ng-london.org.uk)
|
||||
%%Pages: 1
|
||||
%%DocumentFonts:
|
||||
%%DocumentNeededResources:
|
||||
%%DocumentSuppliedResources:
|
||||
%%DocumentData: Clean7Bit
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%DocumentMedia: (Default) 612 792 0 () ()
|
||||
%RBINumCopies: 1
|
||||
%RBINupNess: 1 1
|
||||
%ADO_ImageableArea: 30 33 582 761
|
||||
%RBIDocumentSuppliedFonts:
|
||||
[{
|
||||
%%BeginPluginPS: SetTime
|
||||
/HPDict /ProcSet findresource /SetTime get (20020430145733) exch exec
|
||||
%%EndPluginPS
|
||||
}stopped cleartomark
|
||||
[{
|
||||
%%BeginPluginPS: HPJobname
|
||||
/HPDict /ProcSet findresource /SetJobName get (Untitled_1) exch exec
|
||||
%%EndPluginPS
|
||||
}stopped cleartomark
|
||||
%%EndComments
|
||||
%%BeginDefaults
|
||||
%%ViewingOrientation: 1 0 0 1
|
||||
%%EndDefaults
|
||||
userdict/dscInfo 5 dict dup begin
|
||||
/Title(Untitled-1)def
|
||||
/Creator(Adobe\250 Photoshop\250 6.0: AdobePS 8.7.0)def
|
||||
/CreationDate(3:00 pm Tuesday, April 30, 2002)def
|
||||
/For(FOTOG4)def
|
||||
/Pages 1 def
|
||||
end put
|
||||
%%BeginProlog
|
||||
/md 178 dict def md begin/currentpacking where {pop /sc_oldpacking currentpacking def true setpacking}if
|
||||
%%BeginFile: lw8_feature-1.01
|
||||
%%Copyright: Copyright 1990-1999 Adobe Systems Incorporated and Apple Computer Incorporated. All Rights Reserved.
|
||||
/bd{bind def}bind def
|
||||
/ld{load def}bd
|
||||
/xs{exch store}bd
|
||||
/Z{0 def}bd
|
||||
/T true def
|
||||
/F false def
|
||||
/level2
|
||||
/languagelevel where
|
||||
{
|
||||
pop languagelevel 2 ge
|
||||
}{
|
||||
F
|
||||
}ifelse
|
||||
def
|
||||
/odictstk Z
|
||||
/oopstk Z
|
||||
/fcl
|
||||
{
|
||||
count oopstk sub dup 0 gt
|
||||
{
|
||||
{pop}repeat
|
||||
}{
|
||||
pop
|
||||
}ifelse
|
||||
countdictstack odictstk sub dup 0 gt
|
||||
{
|
||||
{end}repeat
|
||||
}{
|
||||
pop
|
||||
}ifelse
|
||||
}bd
|
||||
/sfcl2
|
||||
{
|
||||
/odictstk countdictstack store
|
||||
count/oopstk xs
|
||||
}bd
|
||||
/efcl2
|
||||
{
|
||||
stopped{$error/newerror F put}if
|
||||
fcl
|
||||
}bd
|
||||
/noload Z
|
||||
/startnoload
|
||||
{
|
||||
{/noload save store}if
|
||||
}bd
|
||||
/endnoload
|
||||
{
|
||||
{noload restore}if
|
||||
}bd
|
||||
/setcopies{
|
||||
level2
|
||||
{
|
||||
1 dict begin/NumCopies exch def currentdict end setpagedevice
|
||||
}{
|
||||
userdict/#copies 3 -1 roll put
|
||||
}ifelse
|
||||
}def
|
||||
level2 startnoload
|
||||
/ststpgdev{}def
|
||||
/dopgdev{}def
|
||||
/stpgdev{}def
|
||||
/buf Z
|
||||
/didstop T def
|
||||
/sfcl
|
||||
{
|
||||
/didstop T store
|
||||
/odictstk countdictstack store
|
||||
count/oopstk xs
|
||||
currentfile cvx stopped
|
||||
{
|
||||
$error/newerror F put
|
||||
didstop
|
||||
{
|
||||
save/didstop xs
|
||||
/buf vmstatus exch sub exch pop dup 0 lt{pop 0}if
|
||||
dup 64000 gt{pop 64000}if string store
|
||||
{
|
||||
currentfile buf readline
|
||||
{
|
||||
(}efcl)eq{exit}if
|
||||
}{
|
||||
/UnexpectedEOF errordict/rangecheck get exec
|
||||
}ifelse
|
||||
}loop
|
||||
didstop restore
|
||||
}if
|
||||
}if
|
||||
fcl
|
||||
}bd
|
||||
/efcl
|
||||
{
|
||||
/didstop F store
|
||||
exec
|
||||
stop
|
||||
}bd
|
||||
level2 endnoload level2 not startnoload
|
||||
/setpagedevice where{pop/realstpgdev/setpagedevice ld}if
|
||||
/SC_topddict Z
|
||||
/SC_spdict Z
|
||||
/$spusrdict F def
|
||||
/dopgdev
|
||||
{
|
||||
userdict/setpagedevice undef
|
||||
$spusrdict
|
||||
{
|
||||
userdict/setpagedevice/realstpgdev load put
|
||||
/$spusrdict F store
|
||||
}if
|
||||
SC_topddict realstpgdev
|
||||
}bd
|
||||
/stpgdev
|
||||
{
|
||||
SC_topddict dup 3 -1 roll
|
||||
{
|
||||
SC_spdict 2 index known
|
||||
{
|
||||
SC_spdict 2 index get
|
||||
dup 3 -1 roll
|
||||
{
|
||||
put dup
|
||||
}forall
|
||||
pop put dup
|
||||
}{
|
||||
put dup
|
||||
}ifelse
|
||||
}forall
|
||||
pop pop
|
||||
}bd
|
||||
/ststpgdev
|
||||
{
|
||||
/setpagedevice where
|
||||
{
|
||||
userdict eq
|
||||
{
|
||||
/$spusrdict T store
|
||||
}if
|
||||
}if
|
||||
userdict/setpagedevice/stpgdev load put
|
||||
/SC_topddict 0 dict store
|
||||
/SC_spdict 3 dict begin
|
||||
/InputAttributes 0 dict def
|
||||
/Policies 0 dict def
|
||||
/OutputAttributes 0 dict def
|
||||
currentdict
|
||||
end
|
||||
store
|
||||
}def
|
||||
/sfcl/sfcl2 ld
|
||||
/efcl/efcl2 ld
|
||||
level2 not endnoload
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_basic-4.0
|
||||
/xdf{exch def}bd
|
||||
/:L/lineto
|
||||
/lw/setlinewidth
|
||||
/:M/moveto
|
||||
/rl/rlineto
|
||||
/rm/rmoveto
|
||||
/:C/curveto
|
||||
/:T/translate
|
||||
/:K/closepath
|
||||
/:mf/makefont
|
||||
/gS/gsave
|
||||
/gR/grestore
|
||||
/np/newpath
|
||||
12{ld}repeat
|
||||
/framewidth -1 def
|
||||
/QDframwid -1 def
|
||||
/numframes Z
|
||||
/mTS matrix def
|
||||
/$m matrix def
|
||||
/av 87 def
|
||||
/por T def
|
||||
/normland F def
|
||||
/psb-nosave{}def
|
||||
/pse-nosave{}def
|
||||
/us Z
|
||||
/psb{/us save store}bd
|
||||
/pse{us restore}bd
|
||||
/level3
|
||||
/languagelevel where
|
||||
{
|
||||
pop languagelevel 3 ge
|
||||
}{
|
||||
F
|
||||
}ifelse
|
||||
def
|
||||
level2 startnoload
|
||||
/setjob
|
||||
{
|
||||
statusdict/jobname 3 -1 roll put
|
||||
}bd
|
||||
/devg/DeviceGray def
|
||||
/devr/DeviceRGB def
|
||||
/devc/DeviceCMYK def
|
||||
level2 endnoload level2 not startnoload
|
||||
/setjob
|
||||
{
|
||||
1 dict begin/JobName xdf currentdict end setuserparams
|
||||
}bd
|
||||
/devg[/DeviceGray]def
|
||||
/devr[/DeviceRGB]def
|
||||
/devc[/DeviceCMYK]def
|
||||
level2 not endnoload
|
||||
/pm Z
|
||||
/mT Z
|
||||
/sD Z
|
||||
/mTSsetup{
|
||||
mT $m currentmatrix mTS concatmatrix pop
|
||||
}bd
|
||||
/pmSVsetup{
|
||||
/pm save store
|
||||
}bd
|
||||
/initializepage
|
||||
{
|
||||
mT concat
|
||||
}bd
|
||||
/endp
|
||||
{
|
||||
pm restore
|
||||
}bd
|
||||
/adjRect
|
||||
{
|
||||
dup 2 mul 6 2 roll
|
||||
4 index sub exch 5 -1 roll sub exch
|
||||
4 2 roll
|
||||
4 index add exch 5 -1 roll add exch
|
||||
4 2 roll
|
||||
}bd
|
||||
/frame1up
|
||||
{
|
||||
gS
|
||||
mTS setmatrix
|
||||
QDframwid lw
|
||||
/setstrokeadjust where{pop T setstrokeadjust}if
|
||||
clippath pathbbox
|
||||
2 index sub exch
|
||||
3 index sub exch
|
||||
currentlinewidth framewidth mul
|
||||
adjRect
|
||||
numframes dup 0 lt{pop 0}if
|
||||
{
|
||||
4 copy
|
||||
rS
|
||||
currentlinewidth framewidth
|
||||
mul 4 mul
|
||||
adjRect
|
||||
}repeat
|
||||
pop pop pop pop
|
||||
gR
|
||||
}bd
|
||||
/$c devr def
|
||||
/rectclip where
|
||||
{
|
||||
pop/rC/rectclip ld
|
||||
}{
|
||||
/rC
|
||||
{
|
||||
np 4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
:K
|
||||
clip np
|
||||
}bd
|
||||
}ifelse
|
||||
/rectfill where
|
||||
{
|
||||
pop/rF/rectfill ld
|
||||
}{
|
||||
/rF
|
||||
{
|
||||
gS
|
||||
np
|
||||
4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
}ifelse
|
||||
/rectstroke where
|
||||
{
|
||||
pop/rS/rectstroke ld
|
||||
}{
|
||||
/rS
|
||||
{
|
||||
gS
|
||||
np
|
||||
4 2 roll
|
||||
:M
|
||||
1 index 0 rl
|
||||
0 exch rl
|
||||
neg 0 rl
|
||||
:K
|
||||
stroke
|
||||
gR
|
||||
}bd
|
||||
}ifelse
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_level1_colorspace-2.0
|
||||
/G/setgray ld
|
||||
/:F1/setgray ld
|
||||
/:F/setrgbcolor ld
|
||||
/:F4/setcmykcolor where
|
||||
{
|
||||
pop
|
||||
/setcmykcolor ld
|
||||
}{
|
||||
{
|
||||
3
|
||||
{
|
||||
dup
|
||||
3 -1 roll add
|
||||
dup 1 gt{pop 1}if
|
||||
1 exch sub
|
||||
4 1 roll
|
||||
}repeat
|
||||
pop
|
||||
setrgbcolor
|
||||
}bd
|
||||
}ifelse
|
||||
/:Fx
|
||||
{
|
||||
counttomark
|
||||
{0{G}0{:F}{:F4}}
|
||||
exch get
|
||||
exec
|
||||
pop
|
||||
}bd
|
||||
/$cs Z
|
||||
/:rg{devr :ss}bd
|
||||
/:sc{$cs :ss}bd
|
||||
/:dc
|
||||
{
|
||||
dup type/arraytype eq{0 get}if
|
||||
dup/DeviceCMYK eq
|
||||
{
|
||||
pop devc
|
||||
}{
|
||||
/DeviceGray eq
|
||||
{
|
||||
devg
|
||||
}{
|
||||
devr
|
||||
}ifelse
|
||||
}ifelse
|
||||
/$cs xdf
|
||||
}bd
|
||||
/:sgl{}def
|
||||
/:dr{}bd
|
||||
/:fCRD{pop}bd
|
||||
/:ckcs{}bd
|
||||
/:ss{/$c xdf}bd
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_uniform_graphics-2.0
|
||||
/@a
|
||||
{
|
||||
np :M 0 rl :L 0 exch rl 0 rl :L fill
|
||||
}bd
|
||||
/@b
|
||||
{
|
||||
np :M 0 rl 0 exch rl :L 0 rl 0 exch rl fill
|
||||
}bd
|
||||
/@c
|
||||
{
|
||||
moveto 0 rlineto stroke
|
||||
}bd
|
||||
/@w
|
||||
{
|
||||
moveto 0 exch rlineto stroke
|
||||
}bd
|
||||
/arct where
|
||||
{
|
||||
pop
|
||||
}{
|
||||
/arct
|
||||
{
|
||||
arcto pop pop pop pop
|
||||
}bd
|
||||
}ifelse
|
||||
/x1 Z
|
||||
/x2 Z
|
||||
/y1 Z
|
||||
/y2 Z
|
||||
/rad Z
|
||||
/@q
|
||||
{
|
||||
/rad xs
|
||||
/y2 xs
|
||||
/x2 xs
|
||||
/y1 xs
|
||||
/x1 xs
|
||||
np
|
||||
x2 x1 add 2 div y1 :M
|
||||
x2 y1 x2 y2 rad arct
|
||||
x2 y2 x1 y2 rad arct
|
||||
x1 y2 x1 y1 rad arct
|
||||
x1 y1 x2 y1 rad arct
|
||||
fill
|
||||
}bd
|
||||
/@s
|
||||
{
|
||||
/rad xs
|
||||
/y2 xs
|
||||
/x2 xs
|
||||
/y1 xs
|
||||
/x1 xs
|
||||
np
|
||||
x2 x1 add 2 div y1 :M
|
||||
x2 y1 x2 y2 rad arct
|
||||
x2 y2 x1 y2 rad arct
|
||||
x1 y2 x1 y1 rad arct
|
||||
x1 y1 x2 y1 rad arct
|
||||
:K
|
||||
stroke
|
||||
}bd
|
||||
/@i
|
||||
{
|
||||
np 0 360 arc fill
|
||||
}bd
|
||||
/@j
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
scale
|
||||
0 0 .5 0 360 arc
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
/@e
|
||||
{
|
||||
np
|
||||
0 360 arc
|
||||
:K
|
||||
stroke
|
||||
}bd
|
||||
/@f
|
||||
{
|
||||
np
|
||||
$m currentmatrix
|
||||
pop
|
||||
:T
|
||||
scale
|
||||
0 0 .5 0 360 arc
|
||||
:K
|
||||
$m setmatrix
|
||||
stroke
|
||||
}bd
|
||||
/@k
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
0 0 :M
|
||||
0 0 5 2 roll
|
||||
arc fill
|
||||
gR
|
||||
}bd
|
||||
/@l
|
||||
{
|
||||
gS
|
||||
np
|
||||
:T
|
||||
0 0 :M
|
||||
scale
|
||||
0 0 .5 5 -2 roll arc
|
||||
fill
|
||||
gR
|
||||
}bd
|
||||
/@m
|
||||
{
|
||||
np
|
||||
arc
|
||||
stroke
|
||||
}bd
|
||||
/@n
|
||||
{
|
||||
np
|
||||
$m currentmatrix
|
||||
pop
|
||||
:T
|
||||
scale
|
||||
0 0 .5 5 -2 roll arc
|
||||
$m setmatrix
|
||||
stroke
|
||||
}bd
|
||||
%%EndFile
|
||||
%%BeginFile: lw8_bubn-2.1
|
||||
/$t Z
|
||||
/$p Z
|
||||
/$s Z
|
||||
/$o 1. def
|
||||
/2state? F def
|
||||
/ps Z
|
||||
level2 startnoload
|
||||
/pushcolor/currentrgbcolor ld
|
||||
/popcolor/setrgbcolor ld
|
||||
/setcmykcolor where
|
||||
{
|
||||
pop/currentcmykcolor where
|
||||
{
|
||||
pop/pushcolor/currentcmykcolor ld
|
||||
/popcolor/setcmykcolor ld
|
||||
}if
|
||||
}if
|
||||
level2 endnoload level2 not startnoload
|
||||
/pushcolor
|
||||
{
|
||||
currentcolorspace $c eq
|
||||
{
|
||||
currentcolor currentcolorspace T
|
||||
}{
|
||||
currentcmykcolor F
|
||||
}ifelse
|
||||
}bd
|
||||
/popcolor
|
||||
{
|
||||
{
|
||||
setcolorspace setcolor
|
||||
}{
|
||||
setcmykcolor
|
||||
}ifelse
|
||||
}bd
|
||||
level2 not endnoload
|
||||
/pushstatic
|
||||
{
|
||||
2state?
|
||||
$o
|
||||
$t
|
||||
$p
|
||||
$s
|
||||
$cs
|
||||
ps
|
||||
}bd
|
||||
/popstatic
|
||||
{
|
||||
/ps xs
|
||||
/$cs xs
|
||||
/$s xs
|
||||
/$p xs
|
||||
/$t xs
|
||||
/$o xs
|
||||
/2state? xs
|
||||
}bd
|
||||
/pushgstate
|
||||
{
|
||||
currentpoint
|
||||
pushcolor
|
||||
currentlinewidth
|
||||
currentlinecap
|
||||
currentlinejoin
|
||||
currentdash exch aload length
|
||||
np clippath pathbbox
|
||||
$m currentmatrix aload pop
|
||||
}bd
|
||||
/popgstate
|
||||
{
|
||||
$m astore setmatrix
|
||||
2 index sub exch
|
||||
3 index sub exch
|
||||
rC
|
||||
array astore exch setdash
|
||||
setlinejoin
|
||||
setlinecap
|
||||
lw
|
||||
popcolor
|
||||
np :M
|
||||
}bd
|
||||
/bu
|
||||
{
|
||||
errordict/nocurrentpoint{pop 0 0}put
|
||||
2state?
|
||||
{
|
||||
pushgstate
|
||||
gR
|
||||
}if
|
||||
pushgstate
|
||||
gR
|
||||
pushgstate
|
||||
pushstatic
|
||||
pm restore
|
||||
mTS setmatrix
|
||||
}bd
|
||||
/bn
|
||||
{
|
||||
/pm save store
|
||||
popstatic
|
||||
popgstate
|
||||
gS
|
||||
popgstate
|
||||
2state?
|
||||
{
|
||||
gS
|
||||
popgstate
|
||||
}if
|
||||
}bd
|
||||
/cpat{pop 64 div setgray 8{pop}repeat}bd
|
||||
%%EndFile
|
||||
/currentpacking where {pop sc_oldpacking setpacking}if end
|
||||
%%EndProlog
|
||||
%%BeginSetup
|
||||
md begin
|
||||
%RBIIncludeNonPPDFeature: NumCopies 1
|
||||
%RBIBeginNonPPDFeature: WaitTimeout 600
|
||||
600/languagelevel where{pop languagelevel 2 ge}{false}ifelse{1 dict dup/WaitTimeout 4 -1 roll put setuserparams}{statusdict/waittimeout 3 -1 roll put}ifelse
|
||||
%RBIEndNonPPDFeature
|
||||
sfcl{
|
||||
%%BeginFeature: *HPColorAsGray No
|
||||
<< /ProcessColorModel /DeviceCMYK >> setpagedevice
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPIntent Colorimetric
|
||||
|
||||
|
||||
userdict /UserRenderIntent (RelativeColorimetric) put
|
||||
|
||||
<<>> setpagedevice
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPAutoScaling Off
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *PageSize Letter
|
||||
/HPDict /ProcSet findresource /SetMargins get [ 0 0 0 0 ] exch exec
|
@ -1,160 +0,0 @@
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *OutputMode Best
|
||||
|
||||
|
||||
<< /PostRenderingEnhance true
|
||||
|
||||
/PostRenderingEnhanceDetails
|
||||
|
||||
<< /PrintQuality 3
|
||||
|
||||
/Type 36 >>
|
||||
|
||||
>> systemdict /setpagedevice get exec
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPMaxDetail False
|
||||
|
||||
|
||||
<< /PostRenderingEnhance true
|
||||
|
||||
/PostRenderingEnhanceDetails
|
||||
|
||||
<< /MaxQualityResolution false
|
||||
|
||||
/Type 36 >>
|
||||
|
||||
>> systemdict /setpagedevice get exec
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *MirrorPrint False
|
||||
<</MirrorPrint false>>setpagedevice
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPTransverse False
|
||||
|
||||
|
||||
userdict /HPCustTrans known
|
||||
|
||||
{
|
||||
|
||||
(<<) cvx exec
|
||||
|
||||
/Orientation
|
||||
|
||||
userdict /HPCustTrans get
|
||||
|
||||
(>>) cvx exec setpagedevice
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
<</Orientation 0>> setpagedevice
|
||||
|
||||
} ifelse
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPPantone False
|
||||
|
||||
|
||||
/SpotColorMatching where {
|
||||
|
||||
pop
|
||||
|
||||
false SpotColorMatching
|
||||
|
||||
} if
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPColorMan Native
|
||||
|
||||
|
||||
/CMYKColorManagement where {
|
||||
|
||||
pop
|
||||
|
||||
/Native CMYKColorManagement
|
||||
|
||||
/sRGB RGBColorManagement
|
||||
|
||||
} if
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPCMYKEmulation None
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPRGBEmulation None
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPCyanBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPMagentaBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPYellowBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
sfcl{
|
||||
%%BeginFeature: *HPBlackBrightness leveleven
|
||||
|
||||
%%EndFeature
|
||||
|
||||
|
||||
}efcl
|
||||
|
||||
(FOTOG4)setjob
|
@ -1,12 +0,0 @@
|
||||
%RBIIncludeStartNup
|
||||
/sD 16 dict def
|
||||
{/Courier findfont[10 0 0 -10 0 0]:mf setfont}stopped{$error/newerror F put}if
|
||||
%%EndSetup
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
%RBIIncludePageSlotInvocation
|
||||
mTSsetup
|
||||
pmSVsetup
|
||||
initializepage
|
||||
(FOTOG4; page: 1 of 1)setjob
|
||||
%%EndPageSetup
|
@ -1,29 +0,0 @@
|
||||
11 -30000 -29999.5 @c
|
||||
-29990 -30000 :M
|
||||
psb
|
||||
gsave %% Print PostScript gsave
|
||||
40 dict begin
|
||||
/_image systemdict /image get def
|
||||
/_setgray systemdict /setgray get def
|
||||
/_currentgray systemdict /currentgray get def
|
||||
/_settransfer systemdict /settransfer get def
|
||||
/_currenttransfer systemdict /currenttransfer get def
|
||||
/blank 0 _currenttransfer exec
|
||||
1 _currenttransfer exec eq def
|
||||
/negative blank
|
||||
{0 _currenttransfer exec 0.5 lt}
|
||||
{0 _currenttransfer exec 1 _currenttransfer exec gt}
|
||||
ifelse def
|
||||
/inverted? negative def
|
||||
/level2 systemdict /languagelevel known
|
||||
{languagelevel 2 ge} {false} ifelse def
|
||||
/level3 systemdict /languagelevel known
|
||||
{languagelevel 3 ge} {false} ifelse def
|
||||
blank not {
|
||||
{} bind
|
||||
/__settransfer {{dummy1 exec dummy2 exec}
|
||||
dup 0 4 -1 roll put dup 2 _currenttransfer put
|
||||
_settransfer} def
|
||||
__settransfer
|
||||
} if
|
||||
gsave % Image Header gsave
|
@ -1,27 +0,0 @@
|
||||
level2 {
|
||||
/DeviceGray
|
||||
setcolorspace currentdict /PhotoshopDuotoneColorSpace undef currentdict /PhotoshopDuotoneAltColorSpace undef } if
|
||||
/picstr1 cols string def
|
||||
/_rowpadstr cols string def
|
||||
/rawreaddata {currentfile exch readhexstring pop} def
|
||||
/padreaddata { _topPad 0 gt { /_topPad _topPad 1 sub def pop _rowpadstr }
|
||||
{ _subImageRows 0 gt { /_subImageRows _subImageRows 1 sub def
|
||||
dup _leftPad _picsubstr rawreaddata putinterval }
|
||||
{ pop _rowpadstr } ifelse } ifelse } def
|
||||
/image2 level2 {/image load def} {{begin
|
||||
Width Height BitsPerComponent ImageMatrix
|
||||
/DataSource load image end} def} ifelse
|
||||
/beginimage {
|
||||
image2
|
||||
} def
|
||||
/readdata /rawreaddata load bind def
|
||||
12 dict begin
|
||||
/ImageType 1 def
|
||||
/Width cols def
|
||||
/Height rows def
|
||||
/ImageMatrix [cols 0 0 rows 0 0] def
|
||||
/BitsPerComponent 8 def
|
||||
/Decode [0 1] def
|
||||
/DataSource {picstr1 readdata} def
|
||||
currentdict end
|
||||
beginimage
|
@ -1,11 +0,0 @@
|
||||
|
||||
grestore end % Image Trailer grestore
|
||||
grestore % Print PostScript grestore
|
||||
pse
|
||||
endp
|
||||
showpage
|
||||
%%PageTrailer
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
@ -1,170 +0,0 @@
|
||||
/* Output IM_CODING_LABQ as band-separated ASCIIHEX for PostScript
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/region.h>
|
||||
|
||||
static int
|
||||
writeimage( REGION *ir, FILE *out )
|
||||
{
|
||||
IMAGE *im = ir->im;
|
||||
int x, y, z;
|
||||
int l = 0;
|
||||
PEL *p;
|
||||
Rect area;
|
||||
|
||||
/* Set up input area.
|
||||
*/
|
||||
area.left = 0;
|
||||
area.top = 0;
|
||||
area.width = im->Xsize;
|
||||
area.height = 1;
|
||||
|
||||
/* Write a byte.
|
||||
*/
|
||||
#define PUT( C ) {\
|
||||
int c1 = (C);\
|
||||
\
|
||||
if( putc( c1, out ) == EOF ) {\
|
||||
im_error( "vips2hp2500cp", "%s", _( "write error - disc full?" ) );\
|
||||
return( -1 );\
|
||||
}\
|
||||
}
|
||||
|
||||
/* Write a hex character.
|
||||
*/
|
||||
#define writehexc( C ) {\
|
||||
int c = (C);\
|
||||
\
|
||||
if( c < 10 ) {\
|
||||
PUT( c + '0' );\
|
||||
}\
|
||||
else\
|
||||
PUT( (c - 10) + 'A' );\
|
||||
}
|
||||
|
||||
/* Write a hex byte.
|
||||
*/
|
||||
#define writehexb( B ) { \
|
||||
int b = (B);\
|
||||
\
|
||||
writehexc( (b >> 4 ) & 0xf );\
|
||||
writehexc( b & 0xf );\
|
||||
}
|
||||
|
||||
/* Output a hex byte, linefeed on eol.
|
||||
*/
|
||||
#define writewrap( B ) { \
|
||||
writehexb( B ); \
|
||||
if( l++ > 30 ) { \
|
||||
PUT( '\n' ); \
|
||||
l = 0; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Loop for each scan-line.
|
||||
*/
|
||||
for( y = 0; y < im->Ysize; y++ ) {
|
||||
/* Ask for this scan-line.
|
||||
*/
|
||||
area.top = y;
|
||||
if( im_prepare( ir, &area ) )
|
||||
return( -1 );
|
||||
p = (PEL *) IM_REGION_ADDR( ir, 0, y );
|
||||
|
||||
if( im->Coding == IM_CODING_LABQ ) {
|
||||
/* Do L* ... easy.
|
||||
*/
|
||||
for( x = 0; x < im->Xsize; x++ )
|
||||
writewrap( p[x*4] );
|
||||
|
||||
/* a* and b* ... more difficult. Photoshop uses
|
||||
* bizzare coding for a/b.
|
||||
*/
|
||||
for( z = 1; z < 3; z++ ) {
|
||||
for( x = 0; x < im->Xsize; x++ ) {
|
||||
int i = (signed char) p[x*4 + z];
|
||||
|
||||
writewrap( i + 128 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( im->Bands == 4 ) {
|
||||
for( z = 0; z < 4; z++ )
|
||||
for( x = 0; x < im->Xsize; x++ ) {
|
||||
int v = p[x*4 + z];
|
||||
|
||||
writewrap( v );
|
||||
}
|
||||
|
||||
/* Extra channel?? Just send zeros.
|
||||
*/
|
||||
for( x = 0; x < im->Xsize; x++ )
|
||||
writewrap( 0xff );
|
||||
}
|
||||
else if( im->Bands == 1 ) {
|
||||
for( x = 0; x < im->Xsize; x++ ) {
|
||||
int v = p[x];
|
||||
|
||||
writewrap( v );
|
||||
}
|
||||
}
|
||||
}
|
||||
PUT( '\n' );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Start here!
|
||||
*/
|
||||
int
|
||||
vips2asciihex( IMAGE *in, FILE *out )
|
||||
{
|
||||
REGION *ir;
|
||||
|
||||
if( im_pincheck( in ) )
|
||||
return( -1 );
|
||||
if( !(ir = im_region_create( in )) )
|
||||
return( -1 );
|
||||
|
||||
if( writeimage( ir, out ) ) {
|
||||
im_region_free( ir );
|
||||
return( -1 );
|
||||
}
|
||||
im_region_free( ir );
|
||||
|
||||
return( 0 );
|
||||
}
|
@ -1,417 +0,0 @@
|
||||
/* Convert lab, cmyk and mono images to postscript.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/util.h>
|
||||
|
||||
#include "vips2dj.h"
|
||||
|
||||
static const char *argv0 = NULL;
|
||||
|
||||
/* Geometries for the printers we know about.
|
||||
*/
|
||||
PrinterGeometry printer_data[] = {
|
||||
/* name, paper width, print width, print length, left, top */
|
||||
{ "2500cp", 2592, 2502, 3728, 51, 82 },
|
||||
{ "3500cp", 3888, 3786, 5212, 51, 82 },
|
||||
{ "5000ps", 4320, 4280, 5212, 20, 99 },
|
||||
{ "4600dn", 595, 570, 817, 11, 15 },
|
||||
{ "4700n", 595, 569, 816, 17, 14 }
|
||||
};
|
||||
|
||||
/* Print a geo entry.
|
||||
*/
|
||||
static void
|
||||
print_printers( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
printf( "%12s %12s %12s %12s %12s %12s\n", "printer name",
|
||||
"paper width", "print width", "print length",
|
||||
"left margin", "top margin" );
|
||||
for( i = 0; i < IM_NUMBER( printer_data ); i++ )
|
||||
printf( "%12s %12d %12d %12d %12d %12d\n",
|
||||
printer_data[i].name,
|
||||
printer_data[i].pwidth,
|
||||
printer_data[i].width,
|
||||
printer_data[i].length,
|
||||
printer_data[i].left,
|
||||
printer_data[i].top );
|
||||
}
|
||||
|
||||
/* Turn a name to a printer geometry.
|
||||
*/
|
||||
static PrinterGeometry *
|
||||
find_printer( char *name )
|
||||
{
|
||||
int i;
|
||||
|
||||
for( i = 0; i < IM_NUMBER( printer_data ); i++ )
|
||||
if( strcmp( name, printer_data[i].name ) == 0 )
|
||||
return( &printer_data[i] );
|
||||
|
||||
im_error( "vips2dj", _( "unknown printer \"%s\"" ), name );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
/* Copy between two fds
|
||||
*/
|
||||
static int
|
||||
copy_bytes( FILE *in, FILE *out )
|
||||
{
|
||||
int ch;
|
||||
|
||||
while( (ch = getc( in )) != EOF )
|
||||
if( putc( ch, out ) == EOF ) {
|
||||
im_error( "vips2dj", "%s",
|
||||
_( "write error -- disc full?" ) );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Send a file to out. Used to transmit the preludes.
|
||||
*/
|
||||
static int
|
||||
transmit_file( char *mode, char *name, FILE *out )
|
||||
{
|
||||
const char *prefix;
|
||||
char buf[PATH_MAX];
|
||||
FILE *in;
|
||||
|
||||
if( !(prefix = im_guess_prefix( argv0, "VIPSHOME" )) )
|
||||
return( -1 );
|
||||
|
||||
/* Send it!
|
||||
*/
|
||||
im_snprintf( buf, PATH_MAX, "%s/share/vips/vips2dj/%s/%s",
|
||||
prefix, mode, name );
|
||||
if( !(in = fopen( buf, "r" )) ) {
|
||||
im_error( "vips2dj", _( "can't find \"%s\"" ), name );
|
||||
return( -1 );
|
||||
}
|
||||
if( copy_bytes( in, out ) ) {
|
||||
fclose( in );
|
||||
return( -1 );
|
||||
}
|
||||
fclose( in );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Send the file to fp. width and height are the size to print at in points.
|
||||
*/
|
||||
static int
|
||||
send_file( PrinterGeometry *geo, IMAGE *im, char *mode,
|
||||
FILE *out, int width, int height )
|
||||
{
|
||||
/* Send all the start stuff.
|
||||
*/
|
||||
if( transmit_file( mode, "head1", out ) )
|
||||
return( -1 );
|
||||
|
||||
/* Set page size.
|
||||
*/
|
||||
fprintf( out, "<</PageSize[%d %d]/ImagingBBox null>>setpagedevice\n",
|
||||
geo->pwidth, height + 2*geo->top );
|
||||
|
||||
if( transmit_file( mode, "head2", out ) )
|
||||
return( -1 );
|
||||
|
||||
/* Set mT (margin transform? don't know)
|
||||
*/
|
||||
fprintf( out, "/mT[1 0 0 -1 %d %d]def\n",
|
||||
geo->left, height + geo->top );
|
||||
|
||||
if( transmit_file( mode, "head3", out ) )
|
||||
return( -1 );
|
||||
|
||||
/* Set rC ... printable area.
|
||||
*/
|
||||
fprintf( out, "gS 0 0 %d %d rC\n", width, height );
|
||||
|
||||
if( transmit_file( mode, "head4", out ) )
|
||||
return( -1 );
|
||||
|
||||
/* Set image params.
|
||||
*/
|
||||
fprintf( out, "/rows %d def\n", im->Ysize );
|
||||
fprintf( out, "/cols %d def\n", im->Xsize );
|
||||
fprintf( out, "%d %d scale\n", width, height );
|
||||
|
||||
if( transmit_file( mode, "head5", out ) )
|
||||
return( -1 );
|
||||
|
||||
/* Send the body of the image.
|
||||
*/
|
||||
if( vips2asciihex( im, out ) )
|
||||
return( -1 );
|
||||
|
||||
if( transmit_file( mode, "head6", out ) )
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Start here!
|
||||
*/
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
IMAGE *im = NULL;
|
||||
FILE *out = stdout;
|
||||
int width = -1;
|
||||
int height = -1;
|
||||
int dpi = -1;
|
||||
int max = 0;
|
||||
int rotate = 0;
|
||||
int one2one = 0;
|
||||
PrinterGeometry *geo = find_printer( "2500cp" );
|
||||
char *mode;
|
||||
int i;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
|
||||
argv0 = argv[0];
|
||||
|
||||
if( argc <= 1 ) {
|
||||
printf(
|
||||
"usage:\n"
|
||||
"\t%s [options] <image file>\n"
|
||||
"convert RGB, LAB, CMYK and mono image files to postscript\n"
|
||||
"\tRGB converted to LAB, assuming sRGB\n"
|
||||
"\tLAB printed with printer colour management\n"
|
||||
"\tCMYK sent directly as dot percent\n"
|
||||
"\tmono prints as K only\n"
|
||||
"options include:\n"
|
||||
"\t-printer <name>\tformat for printer <name>\n"
|
||||
"\t-3500cp\t\tfor HP 3500CP printer (default 2500cp)\n"
|
||||
"\t-max\t\tprint as large as possible\n"
|
||||
"\t-rotate\t\trotate, if necessary, to fill the page\n"
|
||||
"\t-1:1\t\tsize the image to print at 1:1 ... resolution in\n"
|
||||
"\t\t\timage header must be set for this\n"
|
||||
"\t-width <n>\tforce specified width, in points\n"
|
||||
"\t-height <n>\tforce specified height, in points\n"
|
||||
"\t-dpi <n>\tforce specified resolution (default 150dpi)\n"
|
||||
"\t-a5, -a4, -a3, -a2, -a1, -a0\n"
|
||||
"\t\t\tforce specified height (width ignored)\n"
|
||||
"\t-o <file>\toutput to file (default stdout)\n",
|
||||
argv0 );
|
||||
printf( "supported printers:\n" );
|
||||
print_printers();
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/* Decode args .. just look for file names and our three options.
|
||||
*/
|
||||
for( i = 1; i < argc; i++ )
|
||||
if( *argv[i] == '-' ) {
|
||||
if( strcmp( argv[i]+1, "width" ) == 0 ) {
|
||||
if( !argv[i+1] || sscanf( argv[i+1],
|
||||
"%d", &width ) != 1 || width <= 10 )
|
||||
error_exit( "bad width" );
|
||||
i++;
|
||||
}
|
||||
else if( strcmp( argv[i]+1, "height" ) == 0 ) {
|
||||
if( !argv[i+1] || sscanf( argv[i+1],
|
||||
"%d", &height ) != 1 || height <= 10 )
|
||||
error_exit( "bad height" );
|
||||
i++;
|
||||
}
|
||||
else if( strcmp( argv[i]+1, "3500cp" ) == 0 ) {
|
||||
geo = find_printer( "3500cp" );
|
||||
}
|
||||
else if( strcmp( argv[i]+1, "printer" ) == 0 ) {
|
||||
if( !argv[i+1] ||
|
||||
!(geo = find_printer( argv[i+1] )) )
|
||||
error_exit( "bad printer model" );
|
||||
i++;
|
||||
}
|
||||
else if( strcmp( argv[i]+1, "dpi" ) == 0 ) {
|
||||
if( !argv[i+1] || sscanf( argv[i+1],
|
||||
"%d", &dpi ) != 1 || dpi <= 1 ||
|
||||
dpi >= 600 )
|
||||
error_exit( "bad dpi" );
|
||||
i++;
|
||||
}
|
||||
else if( strcmp( argv[i]+1, "o" ) == 0 ) {
|
||||
if( !argv[i+1] || !(out = fopen(
|
||||
argv[i+1], "w" )) )
|
||||
error_exit( "bad output name" );
|
||||
i++;
|
||||
}
|
||||
else if( strcmp( argv[i]+1, "1:1" ) == 0 )
|
||||
one2one = 1;
|
||||
else if( strcmp( argv[i]+1, "a5" ) == 0 )
|
||||
height = 595;
|
||||
else if( strcmp( argv[i]+1, "a4" ) == 0 )
|
||||
height = 839;
|
||||
else if( strcmp( argv[i]+1, "a3" ) == 0 )
|
||||
height = 1187;
|
||||
else if( strcmp( argv[i]+1, "a2" ) == 0 )
|
||||
height = 1678;
|
||||
else if( strcmp( argv[i]+1, "a1" ) == 0 )
|
||||
height = 2373;
|
||||
else if( strcmp( argv[i]+1, "a0" ) == 0 )
|
||||
height = 3356;
|
||||
else if( strcmp( argv[i]+1, "max" ) == 0 )
|
||||
max = 1;
|
||||
else if( strcmp( argv[i]+1, "rotate" ) == 0 )
|
||||
rotate = 1;
|
||||
else
|
||||
error_exit( "bad flag" );
|
||||
}
|
||||
else {
|
||||
/* Try to open the file.
|
||||
*/
|
||||
if( im != NULL || !(im = im_open( argv[i], "r" )) )
|
||||
error_exit( "bad input image" );
|
||||
}
|
||||
|
||||
if( im == NULL )
|
||||
error_exit( "no input image" );
|
||||
|
||||
/* Turn 3-band uchar images into LABQ. Yuk! But convenient.
|
||||
*/
|
||||
if( im->Coding == IM_CODING_NONE &&
|
||||
im->Bands == 3 && im->BandFmt == IM_BANDFMT_UCHAR ) {
|
||||
IMAGE *t[3];
|
||||
|
||||
if( im_open_local_array( im, t, 3, "vips2dj", "p" ) ||
|
||||
im_sRGB2XYZ( im, t[0] ) ||
|
||||
im_XYZ2Lab( t[0], t[1] ) ||
|
||||
im_Lab2LabQ( t[1], t[2] ) )
|
||||
error_exit( "error converting to LAB" );
|
||||
|
||||
im = t[2];
|
||||
}
|
||||
|
||||
/* Stop used-before-set complaints on mode.
|
||||
*/
|
||||
mode = "lab";
|
||||
|
||||
/* Pick a PS mode.
|
||||
*/
|
||||
if( im->Coding == IM_CODING_LABQ )
|
||||
mode = "lab";
|
||||
else if( im->Coding == IM_CODING_NONE &&
|
||||
im->Bands == 4 && im->BandFmt == IM_BANDFMT_UCHAR )
|
||||
mode = "cmyk";
|
||||
else if( im->Coding == IM_CODING_NONE &&
|
||||
im->Bands == 1 && im->BandFmt == IM_BANDFMT_UCHAR )
|
||||
mode = "mono";
|
||||
else
|
||||
error_exit( "unsupported image type "
|
||||
"(IM_CODING_LABQ, mono, IM_TYPE_CMYK only)" );
|
||||
|
||||
/* Autorotate image to fill the page. We ought to get PS to do the
|
||||
* rotate, really.
|
||||
*/
|
||||
if( rotate ) {
|
||||
float iaspect = (float) im->Xsize / im->Ysize;
|
||||
float paspect = (float) geo->width / geo->length;
|
||||
|
||||
if( iaspect > paspect ) {
|
||||
IMAGE *t[1];
|
||||
|
||||
if( im_open_local_array( im, t, 1, "vips2dj", "p" ) ||
|
||||
im_rot90( im, t[0] ) )
|
||||
error_exit( "error rotating" );
|
||||
|
||||
im = t[0];
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure width and height are both set.
|
||||
*/
|
||||
if( one2one ) {
|
||||
/* Set width/height from res.
|
||||
*/
|
||||
if( im->Xres <= 0 || im->Xres >= 100 ||
|
||||
im->Yres <= 0 || im->Yres >= 100 )
|
||||
error_exit( "uanble to print 1:1 - resolution not "
|
||||
"set in image" );
|
||||
|
||||
height = (((im->Ysize / im->Yres) / 10.0) / 2.54) * 72.0;
|
||||
width = (((im->Xsize / im->Xres) / 10.0) / 2.54) * 72.0;
|
||||
}
|
||||
else if( max ) {
|
||||
float iaspect = (float) im->Xsize / im->Ysize;
|
||||
float paspect = (float) geo->width / geo->length;
|
||||
|
||||
if( iaspect > paspect )
|
||||
/* Image aspect ratio > paper ... fit width.
|
||||
*/
|
||||
width = geo->width;
|
||||
else
|
||||
height = geo->length;
|
||||
}
|
||||
else if( dpi > 0 ) {
|
||||
/* Given res ... set width/height.
|
||||
*/
|
||||
height = (im->Ysize / (float) dpi) * 72.0;
|
||||
width = (im->Xsize / (float) dpi) * 72.0;
|
||||
}
|
||||
|
||||
if( width >= 0 || height >= 0 ) {
|
||||
/* Given width or height or both --- set other one.
|
||||
*/
|
||||
if( height < 0 ) {
|
||||
float fdpi = im->Xsize / (width / 72.0);
|
||||
height = (im->Ysize / fdpi) * 72.0;
|
||||
}
|
||||
else {
|
||||
float fdpi = im->Ysize / (height / 72.0);
|
||||
width = (im->Xsize / fdpi) * 72.0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Nothing set ... default to 150 dpi.
|
||||
*/
|
||||
height = (im->Ysize / 150.0) * 72.0;
|
||||
width = (im->Xsize / 150.0) * 72.0;
|
||||
}
|
||||
|
||||
if( send_file( geo, im, mode, out, width, height ) )
|
||||
error_exit( "error sending file" );
|
||||
|
||||
return( 0 );
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
/* Header for vips2dj.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Copyright (C) 1991-2003 The National Gallery
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
/* Geometry for a printer model.
|
||||
*/
|
||||
typedef struct {
|
||||
char *name; /* Printer name (eg. "2500cp") */
|
||||
int pwidth; /* Paper width (36/54 inches) */
|
||||
int width; /* Printable width, points */
|
||||
int length; /* Printable length, points */
|
||||
int left; /* Left margin, points */
|
||||
int top; /* Top margin, points */
|
||||
} PrinterGeometry;
|
||||
|
||||
/* All the models.
|
||||
*/
|
||||
extern PrinterGeometry printer_data[];
|
||||
|
||||
extern int vips2asciihex( IMAGE *in, FILE *out );
|
@ -40,6 +40,7 @@ extern "C" {
|
||||
int im_header_int( IMAGE *im, const char *field, int *out );
|
||||
int im_header_double( IMAGE *im, const char *field, double *out );
|
||||
int im_header_string( IMAGE *im, const char *field, char **out );
|
||||
int im_header_as_string( IMAGE *im, const char *field, char **out );
|
||||
GType im_header_get_typeof( IMAGE *im, const char *field );
|
||||
int im_header_get( IMAGE *im, const char *field, GValue *value_copy );
|
||||
|
||||
|
@ -228,6 +228,50 @@ im_header_string( IMAGE *im, const char *field, char **out )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* im_header_as_string:
|
||||
* @im: image to get the header field from
|
||||
* @field: field name
|
||||
* @out: return field value as string
|
||||
*
|
||||
* Gets @out from @im under the name @field.
|
||||
* This function will read any field, returning it as a printable string.
|
||||
* You need to free the string with g_free() when you are done with it.
|
||||
*
|
||||
* See also: im_header_get(), im_header_get_typeof().
|
||||
*
|
||||
* Returns: 0 on success, -1 otherwise.
|
||||
*/
|
||||
int
|
||||
im_header_as_string( IMAGE *im, const char *field, char **out )
|
||||
{
|
||||
GValue value = { 0 };
|
||||
GType type;
|
||||
|
||||
if( im_header_get( im, field, &value ) )
|
||||
return( -1 );
|
||||
|
||||
/* Display the save form, if there is one. This way we display
|
||||
* something useful for ICC profiles, xml fields, etc.
|
||||
*/
|
||||
type = G_VALUE_TYPE( &value );
|
||||
if( g_value_type_transformable( type, IM_TYPE_SAVE_STRING ) ) {
|
||||
GValue save_value = { 0 };
|
||||
|
||||
g_value_init( &save_value, IM_TYPE_SAVE_STRING );
|
||||
if( !g_value_transform( &value, &save_value ) )
|
||||
return( -1 );
|
||||
*out = g_strdup( im_save_string_get( &save_value ) );
|
||||
g_value_unset( &save_value );
|
||||
}
|
||||
else
|
||||
*out = g_strdup_value_contents( &value );
|
||||
|
||||
g_value_unset( &value );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* im_header_get_typeof:
|
||||
* @im: image to test
|
||||
|
@ -15,6 +15,10 @@
|
||||
* - abort() on malloc() failure with DEBUG
|
||||
* 20/10/09
|
||||
* - gtkdoc comment
|
||||
* 6/11/09
|
||||
* - im_malloc()/im_free() now call g_try_malloc()/g_free() ... removes
|
||||
* confusion over whether to use im_free() or g_free() for things like
|
||||
* im_header_string()
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -169,7 +173,7 @@ im_free( void *s )
|
||||
abort();
|
||||
#endif /*DEBUG*/
|
||||
|
||||
free( s );
|
||||
g_free( s );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
@ -210,7 +214,7 @@ im_malloc( IMAGE *im, size_t size )
|
||||
size += 16;
|
||||
#endif /*DEBUGM*/
|
||||
|
||||
if( !(buf = malloc( size )) ) {
|
||||
if( !(buf = g_try_malloc( size )) ) {
|
||||
#ifdef DEBUG
|
||||
abort();
|
||||
#endif /*DEBUG*/
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/internal.h>
|
||||
#include <vips/debug.h>
|
||||
|
||||
#ifdef WITH_DMALLOC
|
||||
#include <dmalloc.h>
|
||||
@ -192,7 +194,7 @@ static im_arg_desc header_get_typeof_args[] = {
|
||||
static int
|
||||
header_get_typeof_vec( im_object *argv )
|
||||
{
|
||||
int *out = ((int *) argv[2]);
|
||||
int *out = (int *) argv[2];
|
||||
|
||||
*out = im_header_get_typeof( (IMAGE *) argv[1],
|
||||
(const char *) argv[0] );
|
||||
@ -252,11 +254,13 @@ static im_arg_desc header_string_args[] = {
|
||||
static int
|
||||
header_string_vec( im_object *argv )
|
||||
{
|
||||
char *out;
|
||||
char **out = (char **) argv[2];
|
||||
|
||||
if( im_header_string( (IMAGE *) argv[1],
|
||||
(const char *) argv[0], &out ) ||
|
||||
!(argv[2] = im_strdup( NULL, out )) )
|
||||
/* Actually, we call im_header_as_string(), so we can do any field and
|
||||
* not just the string-valued ones.
|
||||
*/
|
||||
if( im_header_as_string( (IMAGE *) argv[1],
|
||||
(const char *) argv[0], out ) )
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
@ -266,13 +270,107 @@ header_string_vec( im_object *argv )
|
||||
*/
|
||||
static im_function header_string_desc = {
|
||||
"im_header_string", /* Name */
|
||||
"extract string fields from header", /* Description */
|
||||
"extract fields from headers as strings", /* Description */
|
||||
0, /* Flags */
|
||||
header_string_vec, /* Dispatch function */
|
||||
IM_NUMBER( header_string_args ), /* Size of arg list */
|
||||
header_string_args /* Arg list */
|
||||
};
|
||||
|
||||
/* im_history_get() args.
|
||||
*/
|
||||
static im_arg_desc history_get_args[] = {
|
||||
IM_INPUT_IMAGE( "image" ),
|
||||
IM_OUTPUT_STRING( "history" )
|
||||
};
|
||||
|
||||
/* Call im_history_get() via arg vector.
|
||||
*/
|
||||
static int
|
||||
history_get_vec( im_object *argv )
|
||||
{
|
||||
char **out = (char **) argv[1];
|
||||
const char *str;
|
||||
|
||||
if( !(str = im_history_get( (IMAGE *) argv[0] )) ||
|
||||
!(*out = im_strdup( NULL, str )) )
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Description of im_history_get().
|
||||
*/
|
||||
static im_function history_get_desc = {
|
||||
"im_history_get", /* Name */
|
||||
"return the image history as a string", /* Description */
|
||||
0, /* Flags */
|
||||
history_get_vec, /* Dispatch function */
|
||||
IM_NUMBER( history_get_args ), /* Size of arg list */
|
||||
history_get_args /* Arg list */
|
||||
};
|
||||
|
||||
/* im_getext() args.
|
||||
*/
|
||||
static im_arg_desc getext_args[] = {
|
||||
IM_INPUT_IMAGE( "image" ),
|
||||
IM_OUTPUT_STRING( "history" )
|
||||
};
|
||||
|
||||
/* Call im_getext() via arg vector.
|
||||
*/
|
||||
static int
|
||||
getext_vec( im_object *argv )
|
||||
{
|
||||
void **out = (void **) argv[1];
|
||||
int size;
|
||||
|
||||
/* void/char confusion is fine.
|
||||
*/
|
||||
if( !(*out = im__read_extension_block( (IMAGE *) argv[0], &size )) )
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Description of im_getext().
|
||||
*/
|
||||
static im_function getext_desc = {
|
||||
"im_getext", /* Name */
|
||||
"return the image metadata XML as a string", /* Description */
|
||||
0, /* Flags */
|
||||
getext_vec, /* Dispatch function */
|
||||
IM_NUMBER( getext_args ), /* Size of arg list */
|
||||
getext_args /* Arg list */
|
||||
};
|
||||
|
||||
/* im_printdesc() args.
|
||||
*/
|
||||
static im_arg_desc printdesc_args[] = {
|
||||
IM_INPUT_IMAGE( "image" ),
|
||||
};
|
||||
|
||||
/* Call im_printdesc() via arg vector.
|
||||
*/
|
||||
static int
|
||||
printdesc_vec( im_object *argv )
|
||||
{
|
||||
im_printdesc( (IMAGE *) argv[0] );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Description of im_printdesc().
|
||||
*/
|
||||
static im_function printdesc_desc = {
|
||||
"im_printdesc", /* Name */
|
||||
"print an image header to stdout", /* Description */
|
||||
0, /* Flags */
|
||||
printdesc_vec, /* Dispatch function */
|
||||
IM_NUMBER( printdesc_args ), /* Size of arg list */
|
||||
printdesc_args /* Arg list */
|
||||
};
|
||||
|
||||
/* im_version_string() args.
|
||||
*/
|
||||
static im_arg_desc version_string_args[] = {
|
||||
@ -422,12 +520,15 @@ static im_function binfile_desc = {
|
||||
static im_function *iofuncs_list[] = {
|
||||
&binfile_desc,
|
||||
&cache_desc,
|
||||
&getext_desc,
|
||||
&guess_prefix_desc,
|
||||
&guess_libdir_desc,
|
||||
&header_get_typeof_desc,
|
||||
&header_int_desc,
|
||||
&header_double_desc,
|
||||
&header_string_desc,
|
||||
&history_get_desc,
|
||||
&printdesc_desc,
|
||||
&version_desc,
|
||||
&version_string_desc
|
||||
};
|
||||
|
@ -33,6 +33,9 @@
|
||||
* - don't stop on error
|
||||
* 23/7/09
|
||||
* - ... but do return an error code if anything failed
|
||||
* 6/11/09
|
||||
* - added im_history_get(), im_getexp(), im_printdesc() as wrapped
|
||||
* functions, so "header" is now obsolete
|
||||
*/
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user