home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!usc!venice!gumby.dsd.trw.com!deneva!news
- From: kieffer@spf.trw.com (Robert Kieffer)
- Subject: <Help (Ali?)> How to convert between TIFF data formats
- Message-ID: <2A707479.1D7A@deneva.sdd.trw.com>
- Sender: news@deneva.sdd.trw.com
- Organization: TRW Inc., Redondo Beach, CA
- Date: Fri, 24 Jul 92 21:22:01 GMT
- Lines: 31
-
- Hi fellow programmers,
-
- Simply put, what's the best way to convert from one TIFF data format into
- another? Specifically, I'm writing an application that I would like to
- have accept TIFFs of (almost) any flavor,
- meshed/planar/RGB/CMYK/GrayScale/Alpha/non-alpha/etc... and convert them
- into a single format that I can work with: RGB w/ alpha.
-
- Yes, I can punch the code out to reformat the different data types, but it
- seems to me that with all of the NeXT's support for TIFFs, there should be
- a fairly straightforward way of doing this. I've tried doing the
- following, but with no success:
-
- - Create a new NXBitmapImageRep of the desired format type
- - Create an NXImage that uses the new ImageRep ("useRepresentation:")
- - LockFocus on the NXImage
- - Use the NXImageBitmap() function to draw the source TIFF data into the
- NXImage, (and subsequently into the NXBitmapImageRep in theory)
- - UnlockFocus
- - The NXBitmapImageRep should contain the reformatted data, right?
-
- .. doesn't seem to work.
- Anyway, any light you can throw on this subject will be appreciated.
-
- Thanks,
-
- Robert Kieffer
- kieffer@spf.trw.com
-
- P.S. Ali, thanks for answering my question Re: meshed .vs. planar formats.
-
-