Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!bionet!agate!stanford.edu!UVM.EDU!Tom.Emerson From: Tom.Emerson@UVM.EDU (Tom Emerson) Newsgroups: comp.windows.interviews Subject: Re: How to check that Bitmap is valid? Message-ID: <9104151724.AA18080@UVM.EDU> Date: 15 Apr 91 17:24:29 GMT References: <9104121357.AA03653@control.lth.se> Sender: news@shelby.stanford.edu (USENET News System) Organization: Internet-USENET Gateway at Stanford University Lines: 29 >>>>> On Fri, 12 Apr 91 15:57:09 +0200, Dag Bruck said: Dag> Environment: InterViews 2.6 with patches, Sun-4, SunOS 4.1.1, Dag> Cfront 2.1. Dag> I create bitmap objects using the constructor Dag> Bitmap(const char* filename); Dag> However, if the given filename doesn't refer to a valid bitmap file, Dag> I get some strange X protocol error later on. Dag> QUESTION: How do I check that the created Bitmap object really refers Dag> to a valid bitmap? The way I do it is to #include the bitmap sources and then use the bitmap(void* data, int width, int height, int x0, int y0) with the information supplied with the bitmap. Thomas -- Thomas Emerson ________________ Student Systems Programmer - EMBA Computer Facility / /_) /_ /_ University of Vermont / / \ /__ /__ tree@newton.uvm.edu "It's a pity the universe doesn't use segmented architecture with a protected mode." --- Rick Cook