Commit 485242fa authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

plug-ins/print/Makefile.am plug-ins/print/README

2000-10-14  Sven Neumann  <sven@gimp.org>

	* plug-ins/print/Makefile.am
	* plug-ins/print/README
	* plug-ins/print/gimp_main_window.c
	* plug-ins/print/print-canon.c
	* plug-ins/print/print-escp2.c
	* plug-ins/print/print-pcl.c
	* plug-ins/print/print-printers.c
	* plug-ins/print/print-util.c
	* plug-ins/print/print.c: updated gimp-print to version 4.0b3
parent 06d0b4c0
2000-10-14 Sven Neumann <sven@gimp.org>
* plug-ins/print/Makefile.am
* plug-ins/print/README
* plug-ins/print/gimp_main_window.c
* plug-ins/print/print-canon.c
* plug-ins/print/print-escp2.c
* plug-ins/print/print-pcl.c
* plug-ins/print/print-printers.c
* plug-ins/print/print-util.c
* plug-ins/print/print.c: updated gimp-print to version 4.0b3
2000-10-14 Sven Neumann <sven@gimp.org>
 
* app/user_install.c: applied patch from Ben Gertzfield which fixes
......
......@@ -35,8 +35,8 @@ AM_CPPFLAGS = \
@LPSTAT_DEF@ \
@LPR_DEF@ \
@LPC_DEF@ \
-DVERSION=\"4.0a1\" \
-DRELEASE_DATE=\"11\ Aug\ 2000\"
-DVERSION=\"4.0b3\" \
-DRELEASE_DATE=\"14\ Oct\ 2000\"
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
......
Print plugin for the Gimp. Version 3.0.6 by Robert Krawitz
<rlk@alum.mit.edu> based on version 2.0 by Michael Sweet
<mike@easysw.com>.
This is Gimp-Print version 4.0b3 (beta). Gimp-print is the print
facility for the Gimp, and in addition a suite of drivers that may be
used with common UNIX spooling systems using GhostScript or CUPS.
These drivers provide printing quality for UNIX/Linux on a par with
proprietary vendor-supplied drivers in many cases, and can be used for
many of the most demanding printing tasks.
This version has numerous enhancements:
Please read the release notes (RELNOTES) carefully, as this release is
not entirely compatible with 4.0a3 and earlier releases! There is in
addition a minor incompatibility with 4.0b1 in the Epson head
alignment utility.
1) Full support for the Epson Stylus Photo, Photo 700, and Photo EX
printers, including 6-color printing, 1440x720 dpi resolution, and
"soft" weave for much faster high quality printing.
2) Many new controls, including:
BASIC INSTALLATION
* Output gamma adjustment
* Contrast
* Red/green/blue levels
* Saturation
* Density
* Additional scaling options
If you have downloaded a .tar.gz file (tarball), you should follow
these directions.
3) Improved tonal resolution. Calculations are now done in 16 bit
rather than 8 bit resolution, which eliminates stair stepping.
Input levels do not map one to one onto output levels, so in 8 bit
output resolution multiple input levels will map to a single output
level. Usually the density range is compressed in the light end of
the tonal range, so many different input levels will map to one
output level. Use of 16 bit output resolution avoids this
undesirable behavior and results in smooth tonal gradations in
highlights.
To build and install the Gimp Print plug-in:
4) Saving of all settings between print jobs.
./configure
make
make install
This installs two programs: the print plugin itself (named "print") in
your system Gimp plugin directory, and a utility named "escputil" for
performing head cleaning, nozzle alignment, and other tasks on Epson
Stylus inkjet printers. Type "escputil" for a description of the
options and functionality.
This plugin has been optimized for the Epson Stylus Photo EX, since
that's the printer I own. I am interested in comments on performance
both with Epson Stylus printers and with others.
Please check our web site at http://gimp-print.sourceforge.net for
details about what is and is not supported.
Some tips on tuning the output:
Please report any problems to gimp-print-devel@sourceforge.net.
* Start with the default settings
If you have installed the Gimp as a precompiled package (e. g. from an
RPM), you will need to install the gimp-devel package as well as the
gimp package. The gimp package as supplied in most distributions only
contains what's needed to run the Gimp. The gimp-devel package
contains additional files required to actually build new plugins.
* Brightness and density are not the same thing. Density is a purely
linear adjustment; more density means more ink. Brightness affects
perceived brightness.
If you have installed the Gimp from source on Linux: after running
make install, you must run ldconfig as root before attempting to build
this plugin.
* Higher gamma values result in brighter images with compressed
highlights. Lower gamma values are darker, but with better tonal
range in the highlights.
* Different brands of ink yield different results. I've found that
third party inks on Epson printers are generally too cyan. The
correction for excessive cyan is to add red (or reduce blue and
green).
GHOSTSCRIPT
* I've found that what creates good test patterns does not necessarily
create good photographs. In particular, test patterns often print
well with gamma of .6 or thereabouts, but that gives washed out
photographs. Perhaps when I implement a better contrast control
this can be improved.
This package includes a Ghostscript driver that may be built, allowing
use of this software for general printing purposes. Please read
Ghost/README for more information, including how to build and install
it.
* The contrast control scales polynomially around the midpoint of the
range. Lower contrast will reduce the contrast in the midtones, but
increase the contrast in the highlights and shadows. Contrariwise,
a high contrast value will stretch the scale in midtones,
compressing the highlights and shadows.
The Ghostscript driver also includes everything necessary to configure
use with Grant Taylor's Foomatic printing package (see
http://www.linuxprinting.org for a description of this package).
* There are many combinations of brightness, gamma, and density that
will create acceptable images. You may find that you want different
settings for different images.
* One group of settings you might want to start with is:
CUPS
Brightness 45
Gamma 1.5
Contrast 105
Saturation 1.4
Density 0.8
This package includes a CUPS driver that may be built, allowing use of
this software for general printing purposes. Please read cups/README
for more information, including how to build and install it.
If you prefer Cups-o-matic, instructions may be found in Ghost/README.
Makefile.standalone enables you to build this plugin as a standalone
plugin, without reference to a Gimp source tree.
RECOMMENDED SETTINGS
Enjoy!
We recommend starting with all default settings for the slider
adjustments in the Color Adjustment window. The settings can be
adjusted as necessary for particular combinations of ink, paper, and
subject material.
We recommend use of the Adaptive Hybrid dithering algorithm in most
cases. Users of four color printers may find that the Ordered
dithering algorithm is faster and produces nearly as good output. Use
of this method is strongly discouraged on six color (photo) printers.
On most inkjet printers, 720 dpi will produce very high quality;
1440x720 dpi will produce extremely high quality.
USE OF THE CVS REPOSITORY
If you have a copy of the source from the CVS repository, then prior
to running configure, you must
aclocal;autoconf;automake
-Robert Krawitz, January 13, 2000
If you do run aclocal, beware that versions of the Gimp from 1.1.17
and earlier have a version of gimp.m4 that will create an incorrect
configure script. The patch is as follows:
diff -u /usr/local/share/aclocal/gimp.m4~ /usr/local/share/aclocal/gimp.m4
--- /usr/local/share/aclocal/gimp.m4~ Tue Mar 30 13:49:58 1999
+++ /usr/local/share/aclocal/gimp.m4 Fri Feb 11 22:34:47 2000
@@ -134,6 +134,13 @@
AC_TRY_LINK([
#include <stdio.h>
#include <libgimp/gimp.h>
+GPlugInInfo PLUG_IN_INFO = /* Plug-in information */
+{
+ NULL, /* init_proc */
+ NULL, /* quit_proc */
+ NULL, /* query_proc */
+ NULL, /* run_proc */
+};
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GIMP or finding the wrong"
If you wish to build the Ghostscript driver, you must run 'make ghost'
from top level.
If you wish to build the CUPS driver, you must run 'make cups'
from top level.
If you are building this from a release, you should not have any
trouble because the configure script will already exist.
Enjoy!
......@@ -548,6 +548,19 @@ gimp_create_main_window (void)
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
(*current_printer->media_size) (current_printer, &vars, &paper_width,
&paper_height);
(*current_printer->imageable_area) (current_printer, &vars, &left, &right,
&bottom, &top);
/* Rationalise things a bit by measuring everything from the top left */
top = paper_height - top;
bottom = paper_height - bottom;
printable_width = right - left;
printable_height = bottom - top;
if (vars.scaling < 0.0)
{
const vars_t *lower = print_minimum_settings();
......@@ -2076,7 +2089,7 @@ gimp_preview_update (void)
gint preview_w = MAX (1, (preview_ppi * print_width) / 72);
gint preview_h = MAX (1, (preview_ppi * print_height) / 72);
guchar preview_data[3 * preview_h * preview_w];
guchar *preview_data;
gint v_denominator = preview_h > 1 ? preview_h - 1 : 1;
gint v_numerator = (thumbnail_h - 1) % v_denominator;
......@@ -2086,6 +2099,7 @@ gimp_preview_update (void)
gint v_error = v_denominator / 2;
gint y = 0;
preview_data = g_malloc(3 * preview_h * preview_w);
while (y < preview_h)
{
if (v_cur == v_last)
......@@ -2230,6 +2244,7 @@ gimp_preview_update (void)
gdk_draw_line (preview->widget.window, gcinv, ox, oy - u, ox + u, oy);
gdk_draw_line (preview->widget.window, gcinv, ox, oy - u, ox, oy + u);
}
g_free(preview_data);
}
gdk_flush ();
......
......@@ -78,6 +78,7 @@ static void canon_write_line(FILE *, canon_cap_t, int,
* Each combo is represented by the colors that can be used with
* the installed ink-tank(s)
* Combinations of the codes represent the combinations allowed for a model
* Note that only preferrable combinations should be used
*/
#define CANON_INK_K 1
#define CANON_INK_CMY 2
......@@ -198,7 +199,7 @@ static canon_cap_t canon_model_capabilities[] =
11*72, 17*72,
1200, 600, 2,
11, 9, 10, 18,
CANON_INK_CMYK | CANON_INK_CcMmYK,
CANON_INK_CMYK | CANON_INK_CcMmYyK,
CANON_SLOT_ASF1,
0
},
......@@ -307,11 +308,12 @@ canon_source_type(const char *name, canon_cap_t caps)
static int
canon_printhead_type(const char *name, canon_cap_t caps)
{
if (!strcmp(name,"Black")) return 0;
if (!strcmp(name,"Color")) return 1;
if (!strcmp(name,"Black/Color")) return 2;
if (!strcmp(name,"Photo/Color")) return 3;
if (!strcmp(name,"Photo")) return 4;
if (!strcmp(name,"Black")) return 0;
if (!strcmp(name,"Color")) return 1;
if (!strcmp(name,"Black/Color")) return 2;
if (!strcmp(name,"Photo/Color")) return 3;
if (!strcmp(name,"Photo")) return 4;
if (!strcmp(name,"Black/Photo Color")) return 5;
#ifdef DEBUG
fprintf(stderr,"canon: Unknown head combo '%s' - reverting to black\n",name);
......@@ -492,7 +494,9 @@ canon_parameters(const printer_t *printer, /* I - Printer model */
if ((caps.inks & CANON_INK_CcMmYK))
valptrs[c++]= c_strdup("Photo/Color");
if ((caps.inks & CANON_INK_CcMmYy))
valptrs[c++]= c_strdup("Photo/Color");
valptrs[c++]= c_strdup("Photo");
if ((caps.inks & CANON_INK_CcMmYyK))
valptrs[c++]= c_strdup("Black/Photo Color");
*count = c;
p = valptrs;
}
......@@ -1019,7 +1023,8 @@ canon_print(const printer_t *printer, /* I - Model */
if (printhead==3 && (caps.inks & (CANON_INK_PHOTO_MASK))) {
lcyan = canon_alloc_buffer(buf_length*(delay_lc+1));
lmagenta = canon_alloc_buffer(buf_length*(delay_lm+1));
if ((caps.inks & CANON_INK_CcMmYy))
if ((caps.inks & CANON_INK_CcMmYy) ||
(caps.inks & CANON_INK_CcMmYyK))
lyellow = canon_alloc_buffer(buf_length*(delay_lc+1));
else
lyellow = NULL;
......
......@@ -3580,14 +3580,14 @@ typedef struct /* Weave parameters for a specific pass */
} pass_t;
typedef union { /* Offsets from the start of each line */
off_t v[6]; /* (really pass) */
unsigned long v[6]; /* (really pass) */
struct {
off_t k;
off_t m;
off_t c;
off_t y;
off_t M;
off_t C;
unsigned long k;
unsigned long m;
unsigned long c;
unsigned long y;
unsigned long M;
unsigned long C;
} p;
} lineoff_t;
......
......@@ -930,7 +930,7 @@ static pcl_cap_t pcl_model_capabilities[] =
-1,
},
},
/* LaserJet 4 series */
/* LaserJet 4L */
{ 4,
17 * 72 / 2, 14 * 72,
PCL_RES_150_150 | PCL_RES_300_300,
......@@ -987,7 +987,7 @@ static pcl_cap_t pcl_model_capabilities[] =
-1,
},
},
/* LaserJet 5 series, 6 series */
/* LaserJet 4 series (except as above), 5 series, 6 series */
{ 6,
17 * 72 / 2, 14 * 72,
PCL_RES_150_150 | PCL_RES_300_300 | PCL_RES_600_600,
......
......@@ -1230,6 +1230,42 @@ const printer_t printers[] =
{
"HP LaserJet 4 series",
"pcl-4",
6,
pcl_parameters,
default_media_size,
pcl_imageable_area,
pcl_limit,
pcl_print,
pcl_default_resolution,
{
"",
"",
"",
0,
"",
"",
"",
"",
"",
"",
1.000,
1.0,
-1,
0,
0,
1.000,
1.000,
1.000,
1.000,
1.000,
0,
1.000,
0.615,
}
},
{
"HP LaserJet 4L",
"pcl-4l",
4,
pcl_parameters,
default_media_size,
......@@ -1623,42 +1659,6 @@ const printer_t printers[] =
1.000,
}
},
{
"EPSON Stylus Color 480",
"escp2-480",
21,
escp2_parameters,
default_media_size,
escp2_imageable_area,
escp2_limit,
escp2_print,
escp2_default_resolution,
{
"",
"",
"",
1,
"",
"",
"",
"",
"",
"",
1.000,
1.0,
-1,
0,
0,
0.585,
1.000,
1.000,
1.000,
1.000,
0,
1.000,
1.000,
}
},
{
"EPSON Stylus Color 500",
"escp2-500",
......
......@@ -1606,7 +1606,9 @@ const static papersize_t paper_sizes[] =
{ "Letter", 612, 792, PAPERSIZE_ENGLISH }, /* 8.5in x 11in */
{ "Legal", 612, 1008, PAPERSIZE_ENGLISH }, /* 8.5in x 14in */
{ "Tabloid", 792, 1224, PAPERSIZE_ENGLISH }, /* 11in x 17in */
{ "Executive", 522, 756, PAPERSIZE_ENGLISH }, /* 7.25 * 10.5in */
{ "Postcard", 283, 416, PAPERSIZE_ENGLISH }, /* 100mm x 147mm */
{ "3x5", 216, 360, PAPERSIZE_ENGLISH },
{ "4x6", 288, 432, PAPERSIZE_ENGLISH },
{ "Epson 4x6 Photo Paper", 306, 495, PAPERSIZE_ENGLISH },
{ "5x7", 360, 504, PAPERSIZE_ENGLISH },
......@@ -1710,10 +1712,10 @@ const static papersize_t paper_sizes[] =
{ "C3", 918, 1298, PAPERSIZE_METRIC }, /* 324mm x 458mm */
{ "C4", 649, 918, PAPERSIZE_METRIC }, /* 229mm x 324mm */
{ "C5", 459, 649, PAPERSIZE_METRIC }, /* 162mm x 229mm */
{ "B6/C4", 354, 918, PAPERSIZE_METRIC }, /* 125mm x 324mm */
{ "B6-C4", 354, 918, PAPERSIZE_METRIC }, /* 125mm x 324mm */
{ "C6", 323, 459, PAPERSIZE_METRIC }, /* 114mm x 162mm */
{ "DL", 311, 623, PAPERSIZE_METRIC }, /* 110mm x 220mm */
{ "C7/6", 229, 459, PAPERSIZE_METRIC }, /* 81mm x 162mm */
{ "C7-6", 229, 459, PAPERSIZE_METRIC }, /* 81mm x 162mm */
{ "C7", 229, 323, PAPERSIZE_METRIC }, /* 81mm x 114mm */
{ "C8", 161, 229, PAPERSIZE_METRIC }, /* 57mm x 81mm */
{ "C9", 113, 161, PAPERSIZE_METRIC }, /* 40mm x 57mm */
......@@ -1755,6 +1757,15 @@ const static papersize_t paper_sizes[] =
{ "Penguin small paperback", 314, 513, PAPERSIZE_METRIC }, /* 111mm x 181mm */
{ "Penguin large paperback", 365, 561, PAPERSIZE_METRIC }, /* 129mm x 198mm */
/* Miscellaneous sizes */
{ "Hagaki Card", 283, 420, PAPERSIZE_METRIC }, /* 100 x 148 mm */
{ "Oufuku Card", 420, 567, PAPERSIZE_METRIC }, /* 148 x 200 mm */
{ "Long 3", 340, 666, PAPERSIZE_METRIC }, /* Japanese long envelope #3 */
{ "Long 4", 255, 581, PAPERSIZE_METRIC }, /* Japanese long envelope #4 */
{ "Kaku", 680, 941, PAPERSIZE_METRIC }, /* Japanese Kaku envelope #4 */
{ "Commercial 10", 297, 684, PAPERSIZE_ENGLISH }, /* US Commercial 10 env */
{ "A2 Invitation", 315, 414, PAPERSIZE_ENGLISH }, /* US A2 invitation */
{ "", 0, 0, PAPERSIZE_METRIC }
};
......
......@@ -823,6 +823,21 @@ do { \
} \
} while (0)
static void *
psearch(const void *key, const void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *))
{
int i;
const char *cbase = (const char *) base;
for (i = 0; i < nmemb; i++)
{
if ((*compar)(key, (const void *) cbase) == 0)
return (void *) cbase;
cbase += size;
}
return NULL;
}
/*
* 'printrc_load()' - Load the printer resource configuration file.
*/
......@@ -949,7 +964,7 @@ printrc_load(void)
/*
* The format of the list is the File printer followed by a qsort'ed list
* of system printers. So, if we want to update the file printer, it is
* always first in the list, else call bsearch.
* always first in the list, else call psearch.
*/
if ((strcmp(key.name, _("File")) == 0) && (strcmp(plist[0].name,
_("File")) == 0))
......@@ -963,7 +978,7 @@ printrc_load(void)
}
else
{
if ((p = bsearch(&key, plist + 1, plist_count - 1, sizeof(plist_t),
if ((p = psearch(&key, plist + 1, plist_count - 1, sizeof(plist_t),
(int (*)(const void *, const void *))compare_printers))
!= NULL)
{
......@@ -1047,7 +1062,7 @@ printrc_load(void)
{
if (get_printer_by_driver(key.v.driver))
{
p = bsearch(&key, plist + 1, plist_count - 1,
p = psearch(&key, plist + 1, plist_count - 1,
sizeof(plist_t),
(int (*)(const void *, const void *)) compare_printers);
if (p == NULL)
......@@ -1147,7 +1162,7 @@ printrc_load(void)
{
if (get_printer_by_driver(key.v.driver))
{
p = bsearch(&key, plist + 1, plist_count - 1,
p = psearch(&key, plist + 1, plist_count - 1,
sizeof(plist_t),
(int (*)(const void *, const void *)) compare_printers);
if (p == NULL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment