home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5228 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.6 KB  |  42 lines

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