home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20228 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.8 KB  |  54 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!agate!netsys!pagesat!a2i!mike
  3. From: mike@rahul.net (Mike Smithwick)
  4. Subject: Getting the colormap from a spooled PICT image
  5. Message-ID: <Bzp3xs.8AG@rahul.net>
  6. Sender: news@rahul.net (Usenet News)
  7. Nntp-Posting-Host: bolero
  8. Organization: a2i network
  9. Distribution: worwld
  10. Date: Wed, 23 Dec 1992 04:46:40 GMT
  11. Lines: 41
  12.  
  13. []
  14.  
  15. I am spooling large PICT bitmapped images from the drive as
  16. described in the UMPG, p. 197FF. I'm not exactly clear as to
  17. what is happening when, but I get some sort of pict handle
  18. that let's DrawImage() blat the picture in the window. 
  19.  
  20. I assume that DrawImage() handles the memory allocation stuff
  21. automatically, etc. to permit me to read in the data. Anyway, I take
  22. that pict handle after the call to DrawImage, call GetPictInfo() and
  23. get garbage back. Some of the PictInfo data is correct, the rect size, etc,
  24. but it also tells me that the image depth is only 1 or 0 bits, that
  25. the number of unique colors is only 1 or 2, and so on.
  26.  
  27. The sequence of calls is :
  28.  
  29.         /* set up stdprocs for the spool function */
  30.  
  31.         DrawImage(pict,&rect);
  32.  
  33.         GetPictInfo(pict,&pi,...);
  34.  
  35.          etc...
  36.  
  37. So, the question is, is DrawImage, when spooling the data from the drive
  38. creating a full pict in memory that GetPictInfo() can use? Or is the pict
  39. data incomplete so as to screw up GetPictInfo?
  40.  
  41. And if so, how can I get the colormap info from a spooled file, so I don't
  42. have to load the full image into memory (which defeats the whole process
  43. of spooling).
  44.  
  45. mike
  46.  
  47.  
  48.  
  49. -- 
  50. This message brought to you by the Happy Fun Ball! It's Happy! It's
  51. fun!! It's the HAPPY FUN BALL!!! (Still legal in 16 states)
  52. *** Mike Smithwick - mike@rahul.net 
  53. *** No disclaimer is necessary since I only work for myself, HA! HA! HA! HA!
  54.