v09i067: xtiff, Patch4, Part01/01
dan sears
dbs at decwrl.dec.com
Mon Oct 8 04:04:39 AEST 1990
Submitted-by: dbs at decwrl.dec.com (dan sears)
Posting-number: Volume 9, Issue 67
Archive-name: xtiff/patch4
Patch-To: xtiff: Volume 7, Issue 36 (5/12/90)
Patch-To: xtiff: Volume 7, Issue 54 (5/17/90: patch1)
Patch-To: xtiff: Volume 7, Issue 80 (5/31/90: patch2)
Patch-To: xtiff: Volume 7, Issue 100 (6/18/90: patch3)
This patch file fixes a colormap bug in xtiff
when the user specifies the -nopixmap option
when displaying a bitmap.
--Dan
diff -r -c rev3/Imakefile rev4/Imakefile
*** rev3/Imakefile Mon Jun 18 11:01:18 1990
--- rev4/Imakefile Tue Oct 2 16:00:59 1990
***************
*** 7,14 ****
# -DDESTDIR=/dc0/X11/R4/mit
#
PROGRAMS = xtiff
! LOCAL_LIBRARIES = ../2.2/libtiff/libtiff.a-mips -lX11 -lm
! EXTRA_INCLUDES = -I../libtiff/libtiff
SRCS = xtiff.c
OBJS = xtiff.o
CDEBUGFLAGS = -g
--- 7,14 ----
# -DDESTDIR=/dc0/X11/R4/mit
#
PROGRAMS = xtiff
! LOCAL_LIBRARIES = ../2.2/libtiff/libtiff.a -lX11 -lm
! EXTRA_INCLUDES = -I../2.2/libtiff
SRCS = xtiff.c
OBJS = xtiff.o
CDEBUGFLAGS = -g
diff -r -c rev3/patchlevel.h rev4/patchlevel.h
*** rev3/patchlevel.h Mon Jun 18 11:01:30 1990
--- rev4/patchlevel.h Tue Oct 2 16:00:59 1990
***************
*** 1 ****
! #define PATCHLEVEL 3
--- 1 ----
! #define PATCHLEVEL 4
diff -r -c rev3/xtiff.c rev4/xtiff.c
*** rev3/xtiff.c Mon Jun 18 11:19:11 1990
--- rev4/xtiff.c Tue Oct 2 16:00:59 1990
***************
*** 4,17 ****
* Dan Sears
* Chris Sears
*
! * Revsion 1.3 90/06/18
* Fixed a bug in handling different color masks and byte orders
* for DirectColor visuals.
! * Revsion 1.2 90/05/29
* Fixed a bug with MINISWHITE images.
! * Revsion 1.1 90/05/16
* Fixed a few minor bugs.
! * Revsion 1.0 90/05/07
* Initial release.
*
* Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
--- 4,19 ----
* Dan Sears
* Chris Sears
*
! * Revision 1.4 90/09/27
! * Fixed a bug with colormapping nopixmapped and pixmapped bitmaps.
! * Revision 1.3 90/06/18
* Fixed a bug in handling different color masks and byte orders
* for DirectColor visuals.
! * Revision 1.2 90/05/29
* Fixed a bug with MINISWHITE images.
! * Revision 1.1 90/05/16
* Fixed a few minor bugs.
! * Revision 1.0 90/05/07
* Initial release.
*
* Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
***************
*** 491,497 ****
xGcValues.function = GXcopy;
xGcValues.plane_mask = AllPlanes;
! if (tfPhotometricInterpretation == PHOTOMETRIC_MINISWHITE) {
xGcValues.foreground = XWhitePixel(xDisplay, xScreen);
xGcValues.background = XBlackPixel(xDisplay, xScreen);
} else {
--- 493,499 ----
xGcValues.function = GXcopy;
xGcValues.plane_mask = AllPlanes;
! if (tfPhotometricInterpretation == PHOTOMETRIC_MINISBLACK) {
xGcValues.foreground = XWhitePixel(xDisplay, xScreen);
xGcValues.background = XBlackPixel(xDisplay, xScreen);
} else {
***************
*** 706,713 ****
* of depth one might not be supported." Therefore we create a pixmap
* of depth one and use XCopyPlane(). This is idiomatic.
*/
! if (xImageDepth == 1) {
! xBitmapGc = XCreateGC(xDisplay, xImagePixmap, 0, &xGcValues);
XPutImage(xDisplay, xImagePixmap, xBitmapGc, xImage,
0, 0, 0, 0, xImage->width, xImage->height);
} else
--- 708,718 ----
* of depth one might not be supported." Therefore we create a pixmap
* of depth one and use XCopyPlane(). This is idiomatic.
*/
! if (xImageDepth == 1) { /* just pass the bits through */
! xGcValues.foreground = 1; /* foreground describes set bits */
! xGcValues.background = 0; /* background describes clear bits */
! xBitmapGc = XCreateGC(xDisplay, xImagePixmap,
! GCForeground | GCBackground, &xGcValues);
XPutImage(xDisplay, xImagePixmap, xBitmapGc, xImage,
0, 0, 0, 0, xImage->width, xImage->height);
} else
diff -r -c /dev/null rev4/README
*** /dev/null
--- rev4/README Tue Oct 2 16:11:00 1990
***************
*** 0 ****
--- 1,4 ----
xtiff is a tool for viewing a TIFF file in an X window. It was written to
handle as many different kinds of TIFF files as possible while remaining
simple, portable and efficient. xtiff requires Sam Leffler's libtiff package
which can be found on ucbvax.berkeley.edu.
dan
----------------------------------------------------
O'Reilly && Associates argv at sun.com / argv at ora.com
Opinions expressed reflect those of the author only.
More information about the Comp.sources.x
mailing list