xv 3.10a rollup 2001-05-12 patch - The details To apply the xv 3.10a rollup patch 2001-05-12 patch you must have libtiff, libjpeg, libpng and zlib on your system. If your system vendor did not supply them you may obtain them at: http://freshmeat.net/projects/libtiff/ http://freshmeat.net/projects/libjpeg/ http://freshmeat.net/projects/libpng/ http://freshmeat.net/projects/zlib/ To apply the xv 3.10a rollup patch 2001-05-12 patch, (assuming that you already have libtiff, libjpeg, libpng and zlib) first try: patch --dry-run -p0 < rollup-2001-05-12.patch If all looks well try: patch -p0 < rollup-2001-05-12.patch =-= You may find it easier to apply this patch to the original xv 3.10a src: ftp://ftp.cis.upenn.edu/pub/xv/xv-3.10a.tar.gz The xv 3.10a rollup 2001-05-12 patch may be found at: http://www.isthe.com/chongo/src/xv-patch/rollup-2001-05-12.patch This README came from: http://www.isthe.com/chongo/src/xv-patch/README.rollup-2001-05-12-details =-= In addition to this rollup patch, Linux users need to apply the patch found at: http://www.isthe.com/chongo/src/xv-patch/Linux-compile.patch The above patch changes CC in the Makefile from just 'cc' to 'gcc -ansi'. =-= This is a rollup patch that contains a number of the Recommended and optional patches found at: http://www.trilon.com/xv/downloads.html on 2001-May-12 as well as some security and porting patches. In particular this rollup patch contains these Recommended patches: * Patch to fix Grab problems This patch fixes a potential problem with the Grab command. On some systems, you may find the Grab command going 'out-to-lunch', or maybe it returns, but doesn't appear to have done anything. This patch should probably be applied on all systems, even if they don't exhibit the problem, as it may be WM-dependent. * Patch to fix Visual-picking problem On certain Sun systems with 24-bit framebuffers, xv displays images very dimly. The problem is that Sun provides two identical Visuals with different gamma correction curves, for different types of hardware. Guess what popular Unix image display program picks the wrong one. This patch can be applied on all systems, though it won't gain you anything on any other system. * Patch to keep xv from crashing on Really Long Filenames If you have some big-ass filenames (32 chars or longer) you may run into cases where xv will segfault in the Visual Schnauzer or in certain pop-up dialog boxes. This patch fixes this problem. Note that this only applies to files whose base filename (with the leading path info chopped off) is 32 chars or longer. That's why this bug probably hasn't bit you. * Patch to fix XPM file output errors By cleverly harnessing the amazing power of a missing 'break' statement, xv was writing XPM files with a FITS version of the image conveniently tacked on the end. Hilarity ensues. * Patch to Image display on certain 12-, 15-, or 16-bit X Displays A byte-ordering problem would come into play when displaying 8-bit colormapped images on certain systems. While it's rare to run into this bug (as most people are running either 8 or 24/32-bit graphics these days), it's still a bug. Thanks to Mr. Ryo Shimizu for finding it (and more importantly, fixing it)! * Patch to GIF-reading code While I can't say that I've ever seen the results of this bug (obviously, or I would have fixed it), it's a bug nonetheless. The bug could show up when viewing multiple interlaced GIF files in one run of XV, as the de-interlacer is not properly reinitialized on subsequent runs. Thanks to Mark Hanson for finding it. * Patch to fix non-functional grab on some X servers xv would rather rudely fail to Grab (or display certain XWD files) on systems running the eXceed X server in 24-bit mode. The Grabs would return a correctly-sized, but completely blank image. This patch may well fix Grab problems on other systems (and if so, I'd like to hear about it), and should not break anything. As such, it's recommended for all users. Thanks to Nadim Saeed for his efforts in squishing this bug. * READ THIS to compile XV on RedHat 6, and most other newer ... It's not a patch per se, it's just something that'll tell you something important to know about compiling xv on RedHat Linux 6.0 (and presumably on all newer releases). This same advice may stop xv from compiling on other systems, so don't take this as a generally-useful tidbit that everybody should use. It isn't. * Patch to fix TIFF files being written at 1200dpi For whatever insane reason, the xvtiffwr.c module writes all TIFFs out with resolution tags of 1200dpi. This leaps up and bites you on the ass when you load the resultant TIFF files into a program (such as Photoshop) that actually pays attention to said tags. This patch simply writes all TIFF files with a resolution of 72dpi, a far more reasonable value. * SECURITY PATCH for Postscript Files. Jon Luckey has pointed out that certain malicious PostScript files could write and/or delete user files. This is particularly dangerous if you use xv to display certain email attachments. While most folks know not to run unknown executables received in email, they probably don't realize that PostScript files can also be dangerous. Surprised the hell out of me, at any rate. This patch fixes xv's call to ghostscript such that it has the "-dSAFER" flag turned on, which should prevent such shenanigans. and the rollup contains these optional Patches: * Patch to use Version 6 of the JPEG library You need this trivial patch if you intend to link xv with version 6 of the Independent JPEG Group's JPEG library. This is a newer version of the library than is included in the xv 3.10a distributions listed above. You need the new library to read Progressive JPEG files. NOTE: Version 6 (or compatibly better) of the JPEG library may be found at: http://freshmeat.net/projects/libjpeg/ * Patch to use Version 3.4 of the TIFF Library You need this patch if you intend to link xv with version 3.4 of Sam Leffler's TIFF library. This is a newer version of the library than is included in the xv 3.10a distribution, and probably does something good. (I haven't tried it out.) NOTE: Version 3.4 (or compatibly better) of the TIFF Library may be found at: http://freshmeat.net/projects/libtiff/ * Patch to read/write PNG files. The patch to xv 3.10a, and other needed files (libpng and zlib) all live on this site. I haven't tested any of this personally, so I don't know what-all's involved here, but presumably everything you need to know is up here. Finally, you'll need to apply this patch on top of everything else to fix some minor nits introduced by newer versions of the libpng libary. Sorry about that. (Thanks to Greg Roelofs (newt@pobox.com) and Daniel Thayer (dnthayer@uiuc.edu) for the updated PNG info!) NOTE: libpng may be found at: http://freshmeat.net/projects/libpng/ NOTE: zlib may be found at: http://freshmeat.net/projects/zlib/ NOTE: libpng and zlib are shipped with the RedHat 7.0 (and later). * Patch to 'read' PDF files. According to all-around good guy Bitt Faulk, newer non-GNU/FSF versions of ghostscript can read PDF files. Therefore, it's just a trivial patch to get xv to recognize PDF files as something useful, and pass them off to ghostscript, just like PS files are currently handled. * Patch to use XV as a Netscape plugin. Contributed by David Meleedy, this patch adds a '-windowid #' command-line option to xv, which was previously sorely lacking in command-line options. In any event, the practical upshot of all this is that you can use xv in conjunction with Plugger 3.2 to turn it into a Netscape plug-in. Why would you want to do that, other than to win some sort of bet? Well, the big deal is that by doing this, you can now get Netscape to display non-standard image formats (TIFF, Rasterfile, PNG, etc.) right in a Netscape window, which is certainly cooler than downloading them and firing up xv manually. You can even have a fully-functioning xv, schnauzer and all, running right inside a Netscape window. (Though I dare anyone to come up with a legitimate sporting purpose for that!) David's README has further details: From: David Meleedy [david.meleedy@analog.com] Sent: Tuesday, March 28, 2000 4:42 AM I have added a "-windowid windowid" flag to xv so that you can choose an X display to display xv window's on to. The advantage of this is that you can use it now in conjunction with "plugger 3.2" which lets you pick applications to use as plugins for Netscape. In addition, I added a new "-rmode 10" - root mode 10, which just puts a single copy of the picture in the upper left hand corner of the DISPLAY. I had to do this so that it would look good in a browser. The plugger home page is: http://www.hubbe.net/~hubbe/plugger.html The test page is: http://www.hubbe.net/~hubbe/plugger/test.html I tested using xv to DISPLAY a TIFF image, and a Sun raster image into a frame of a Netscape browser. Here is some of the plugger configuration code I used: image/tiff: tiff,tif: TIFF image image/x-tiff: tiff,tif: TIFF image image/sun-raster: rs: SUN raster image image/x-sun-raster: rs: SUN raster image : xv -rmode 10 -windowid $window $file -quit image/png: png: PNG image image/x-png: png: PNG image : xv -rmode 10 -windowid $window $file -quit I have contacted the author the "Plugger 3.2" to let him know that this new option will soon be available as a patch for xv, but I'd like to put up the changes directly on your site. I have included the patches with this email. Please let me know * if you can apply them with no problems * if the code looks clean (up to your standards) Note that if you just change the setup code slightly for plugger: : xv -windowid $window $file You can have a fully functioning xv program in a Netscape browser. You can even right click to bring up xv's controls, etc.. Let me know what you think. Thanks, -Dave ================================================================ David Meleedy Analog Devices, Inc. David.Meleedy@analog.com Three Technology Way Phone: 781 461 3494 Norwood, MA 02062-9106 USA NOTE: Plugger 3.2 may be found at: http://www.hubbe.net/~hubbe/plugger.html * Patch to read 32-bit-per-pixel BMP files. Apparently such beasts exist these days. (They didn't back when I originally wrote the BMP i/o module.) Presumably the extra 8 bits are for an alpha channel, which xv will completely ignore. Still, better'n nothing. =-=-=-=-= It is worth noting that this rollup patch does NOT contain all of the following patches found on the: http://www.trilon.com/xv/downloads.html recommended and optional patches listed as of 2001-May-05. In particular this rollup patch does NOT contain: * Patch to read & display multi-page TIFF files * Patch to compile XV on BeOS * Patch to upgrade xv 3.10 to 3.10a =-=-=-=-= This rollup patch also contains: * Security patch to fix a buffer overflow problem in vdcomp * Detects the existence of Linux via the __linux__ symbol * Makefile change to permit direct use of -ljpeg * Makefile change to permit direct use of -ltiff * Makefile change to permit direct use of usleep under Linux * Makefile change to permit direct use of BSDTYPES under Linux =-=-=-=-= In addition to this rollup patch, Linux users need to apply the Makefile patch found at: http://www.isthe.com/chongo/src/xv-patch/Linux-Makefile.patch This patch changes CC in the Makefile from just 'cc' to 'gcc -ansi'. =-= Disclaimers This patch is being 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. This patch is in the public domain and is NOT copyrighted. That is, use this patch at your own risk. While I did roll up a number of patches from the xv v3.10a recommended and optional patch set, and while I resolved some of the patch conflicts, and while I added some help for Linux, I did NOT write most of the patch. I do NOT maintain xv. Please do NOT send me xv bug reports. Send xv bug reports (and fixes) to the xv tech EMail address: http://www.trilon.com/xv/index.html#email I did NOT write xv. You are welcome to ``Share and Enjoy'' xv and send $25 to John Bradley. :-) chongo (http://www.isthe.com/chongo/index.html) /\oo/\