ftp.nice.ch/pub/next/developer/objc/appkit/TIFFandEPS.README

This is the README for TIFFandEPS.NIHS.bs.tar.gz [Download] [Browse] [Up]

TIFFandEPS 
by Sharon Zakhour, NeXT Developer Support Team

Valid for 3.0

Overview

This example shows how to open EPS or TIFF images and save them back out as EPS or TIFF -- converting the image in the process.  The example was originally written to convert from EPS-format images to TIFF-format images.  The implementation used draws the image into an instance of ImageView.  This view is then inserted as the contentView of the window created by ImageReader to the exact size of the image.  The TIFF version is generated using the initData:fromRect: method of NXBitmapImageRect.  This method allows you to create bitmap data from anywhere on the screen quickly and easily but has some inherent drawbacks:  as the bits are being read from the windowserver backing store the resulting image is limited to the window resolution and will contain any dithering artifacts generated by the windowserver.  

Excerpted from the initData:fromRect: description in the NXBitmapImageRep spec sheet:

This method uses PostScript imaging operators to read the image data into the data buffer; the object is then created from that data.  The object is initialized with information about the image obtained from the Window Server.

The NXImage classes do not contain support for converting an image to EPS so the View method copyPScodeInside:to: is used to convert in this direction.

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.