📄 readme
字号:
@(#)README 1.2 11/8/90XLOADIMAGE - X11 Image Loading UtilityWHAT IS IT?This utility will view several types of images under X11, or loadimages onto the root window. The current version supports: Faces Project GIF Portable Bitmap (PBM) Sun Rasterfile X11 Bitmap X PixmapA variety of options are available to modify images prior to viewing.These options include clipping, dithering, depth reduction, zoom(either X or Y axis independently or both at once), brightening ordarkening, and image merging. When applicable, these options are doneautomatically (eg a color image to be displayed on a monochrome screenwill be dithered automatically).COMPILINGThere are three ways to compile xloadimage, depending on whatenvironment you have.If you are compiling under the X11R4 distribution, the apropriateImakefile is included and you should compile as with any other client.I haven't personally tested this, but if it's broken it'll be easy tofix.If you have gcc on your system, and it's not gcc 1.37, compile via"make -f Makefile.gcc". Gcc should be used if it works because thestrength-reduction and inline-functions directives dramaticallyimprove performance of some operations. Please note that use of gccon some systems, particularly Sun-4, may cause problems, and that gcc1.37 will not work due to an optimizer bug which causes GIF imageloading and colormap reduction to fail. If improper behavior isnoticed after compiling with gcc, please try using Makefile.std beforereporting a problem.Normal compilations can be done via "make -f Makefile.std". Thisinvokes the standard cc using the -O flag.WORKAROUNDS FOR BROKEN SERVERSSome servers which use odd-depth displays (eg not 1 or a multiple of 8bits) do not correctly handle a plane mask with GXcopy. If yourserver displays color images in only two colors although it supportsmore colors, add a -DSERVER_HAS_BROKEN_PLANEMASK to CFLAGS in theMakefile. Some Visual X-19 Turbo displays have this problem; youshould request an updated ROM if you have one of these.INSTALLATIONAfter compiling and installing xloadimage, I recommend linking orsymlinking to the executable with the names "xview" and "xsetbg". Thedefault behavior is slightly different when invoked with thesecommands (they're also easier to type). If you have a public imagearea you should consider setting the SYSPATHFILE option in themakefile and setting up a system-wide configuration file. See the manpage for information on the format of this file.IMPLEMENTATIONMost functions are not particularly fast, and some functions usesimple-minded algorithms deliberately over more advanced ones. Istressed portability over all and simplicity over performance. Ibelieve the result is a usable, portable tool which should serve theneeds of most users.The source code is basically in two parts: image manipulation routinesand everything else. The image manipulation routines should becompletely independent of X, thus allowing people to use them underother graphical systems. No guarantees here, but I tried.Performance-oriented people will notice that when loading a colorimage, the colormap of the image is minimized (and all pixel values inthe image changed), then the colormap is redone (and all pixel valuesin the image changed again) before sending to X. This could bereduced to only one remapping of the image but I wanted to keep theimage from X's grubby (greedy?) hands as long as possible, and theimage merging function really wants the image to have a minimizedcolormap.OWNERSHIPI used a modified version of the MIT X Consortium copyright with allof these functions, thereby allowing full freedom with the code solong as the copyright notices remain intact. Free code can be goodcode. All contributions have similar notices.SUGGESTIONS AND BUG REPORTSSuggestions and bug reports should go to: Jim Frost jimf@saber.com ..harvard!saber!jimfPlease include the version number and sample image data if you arereporting a bug.Functions implementing new image types are welcomed; mail them to thesame address and I'll do my best to distribute them. Try do send themas public domain so I can keep the number of differing copyrightmessages to a minimum -- I'll use my standard message and leave theimplementor's name and information in the file for credit. I wouldn'tcopyright this stuff at all except that it's a requirement for X11distribution.THANKSSpecial thanks to the crew at the Boston University Graphics Lab fortheir assistance and sample images, and to bzs@std.com for his simpledithering algorithm (or what's left of it). Real special thanks toKirk L. Johnson (tuna@athena.mit.edu) for a very nice GIF loader anddithering routine, to Mark Snitily (zok!mark@apple.com) for 386/ixcompatibility work, to Andreas Stolcke (stolcke@icsib12.berkeley.edu)for miscellaneous bug fixes, to Anthony A. Datri (datri@convex.com)for adding the class hint, to Mark Moraes (moraes@cs.toronto.edu) forthe slideshow colormap fix, to Gregg Townsend (gmt@cs.arizona.edu) fora suggested dithering routine, to Brian Frost (B1F5814@RIGEL.TAMU.EDU)for changes for VMS, to Chip Horstman for G3 FAX support, and to DeronDann Johnson (dj@eng.sun.com) for fixing the RetainTemporary bug.HISTORYPatch 01 contained a new Makefile.std, Makefile.gcc, and Imakefile.It contained a bug-fix to sendImageToX() which allowed bitmaps to besent from little-endian machines (eg VAX, 80386) correctly, and a fixto xbitmapLoad() to allow correct loading of X10 bitmap images. Anenhancement to imageInWindow() which allowed exiting from imagewindows by typing 'q' was submitted by Chris Tengi(tengi@idunno.princeton.edu) and was included. The previously missingfile 'patchlevel' was included.Patch 02 contained modifications to the Makefiles, support for the XPixmap image type, a different dithering algorithm that didn't blowthe image up (with the old one moved to halftone.c), and a bug fix tozoom.c to correct problems when zooming bitmaps.Patch 03 contained a new loader for GIF files. The dither bits arrayin dither.c was changed so it worked properly, and both dither.c andhalftone.c had minor bugs fixed. Merge.c was modified to correct bugswhen merging RGB images. Pbm.c was modified to handle raw formatimages. Root.c was modified to deny image loads which would changethe root window's colormap. Send.c was modified to use shared colorswhenever possible and to handle color displays which have depths whichare not a multiple of 8. Window.c was modified to avoid deleting thedefault colormap, allowing proper operation on some servers prior toX11R3 patchlevel 08. There were many miscellaneous bug fixes.Patchlevel 04 contained an enhancement to root.c to useRetainTemporary and KillClient(disp, AllTemporary) so that it couldclean up after itself when reloading. The -quiet and -zoom options nolonger cause garbage to be displayed for the image title. A small bugin new.c that caused incorrect allocation of bitmap images was fixed.Several calls to XCreateColormap were missing the "visual" parameterin send.c; this was fixed. A bug relating to -border and monochromedisplays was fixed. There were several changes to the Imakefile andMakefiles.Patchlevel 05 contained enhancements to allow slideshows andfullscreen viewing, some bug fixes related to scrolling around withinimages, Saber-C makefile enhancements, a bug fix to the halftoningtitle, and the addition of greyscale Sun Rasterfile support.Patchlevel 06 contained support for G3 FAX images, bug fixes tomerge.c to fix some signed/unsigned errors and clipping problems,changes to root.c to make previously allocated resources be freedproperly, and a completely new dithering routine.This derivative of version 1.06 of xloadimage has an additionaloption to allow slideshows under program control; also included isa program "next_slide" for controlling the advance from one imageto the next. Although written by Entropic Research Laboratory, thenext_slide program and Entropic's additions to xloadimage arefree software; they are NOT covered by ERL's license agreements forESPS and waves+; and the fees paid to ERL as part of those licenseagreements do NOT include any payments for this software. Thenext_slide program and Entropic's additions to xloadimage arecovered by the same type of "MIT-style" copyright notice and disclaimerof liability that cover the main body of xloadimage and othercontributions thereto. Briefly, you are free to use this software,copy it, and pass it on to other people provided that the relevantnotices remain intact. See the source files for the full text ofthe notices.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -