home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / pascal / 6482 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.5 KB  |  33 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!news.ccs.queensu.ca!mast.queensu.ca!dmurdoch
  3. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  4. Subject: Re: Raw Data
  5. Message-ID: <dmurdoch.267.721492484@mast.queensu.ca>
  6. Lines: 21
  7. Sender: news@knot.ccs.queensu.ca (Netnews control)
  8. Organization: Queen's University
  9. References: <05TqTB1w165w@tsoft.sf-bay.org> <1992Nov6.163908.19859@sbcs.sunysb.edu> <1992Nov11.134914.27768@lth.se>
  10. Date: Wed, 11 Nov 1992 14:34:44 GMT
  11.  
  12. In article <1992Nov11.134914.27768@lth.se> d92bo@efd.lth.se (Bengt Oehman) writes:
  13. >The correct way to handle this is the following:
  14. >At the DOS-prompt, use BINOBJ to convert binary data into a procedure.
  15. >eg.
  16. >    "c:\tp>binobj mydata.bin mydata.obj imagedata"
  17. >
  18. >where mydata.bin is your binary picture, mydata.obj is the object file to
  19. >be linked into your program, and imagedata the name of the procedure which
  20. >contains the data.
  21.  
  22. That's probably the fastest way to do it, but it's not necessarily the 
  23. best.  It takes up RAM all the time, even when you're not using it.  It's 
  24. sometimes better to store the data in a resource file, and attach the 
  25. resource file to your .EXE.  Then you can load all the images you need on
  26. to the heap, display them from there in rapid succession, and then delete 
  27. them - so there's no cost in memory when you don't need them.  If speed 
  28. wasn't a big concern, you could load them directly from the resource file 
  29. into video ram, but this would probably look pretty ugly.
  30.  
  31. Duncan Murdoch
  32. dmurdoch@mast.queensu.ca
  33.