Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!apollo!oj From: oj@apollo.uucp (Ellis Oliver Jones) Newsgroups: comp.sys.apollo Subject: Re: GPR Bitmap File format Message-ID: <3925c496.d5b2@apollo.uucp> Date: 18 Dec 87 23:59:00 GMT References: <8712091529.AA02789@ELI.CS.YALE.EDU> Reply-To: oj@apollo.UUCP (Ellis Oliver Jones) Organization: Apollo Computer, Chelmsford, MA Lines: 48 In article <8712091529.AA02789@ELI.CS.YALE.EDU> ferguson@BKNLVMS.BITNET writes: >Does anyone know the exact file format of [color] GPR bitmaps...? The exact internal format is (obviously) around here someplace, but it's not very pleasant to work with. Have you tried gpr_$open_bitmap_file ? It allows you to specify the parameters of a bitmap file, then create it. You get back (indirectly) a bunch of good stuff such as the location of the storage, the number of bytes per line, etc. Once you have the storage_offset and the bytes_per_line, you can scribble away into the bitmap. If you init GPR in no_display mode, you can write a bitmap file without even disturbing your screen. This works for multibit pixels at SR9.7 (and beyond...) Enjoy. /oj Here are some of the relevant items from /sys/ins/gpr.ins.pas { external bitmap group header descriptor } gpr_$bmf_group_header_t = RECORD n_sects : integer16; <- you set this to 1 pixel_size : integer16; <- you set this 1-32 (to 8 for pseudocolor) allocated_size : integer16; <- you set this to zero, it comes back w ACTUAL bits/pixel bytes_per_line : integer16; <- you set this to zero...GPR sets it for you ) bytes_per_sect : integer32; <- ditto storage_offset : univ_ptr; <- ditto END; { array of external bitmap group header descriptors } gpr_$bmf_group_header_array_t = ARRAY [0..gpr_$max_bmf_group] OF gpr_$bmf_group_header_t; ... { GPR_$OPEN_BITMAP_FILE obtains access to an external bitmap } PROCEDURE gpr_$open_bitmap_file ( IN access : gpr_$access_mode_t; IN filename : UNIV name_$pname_t; { pathname of bitmap file } IN namesize : integer; { length of file name } IN OUT version : gpr_$version_t; IN OUT size : gpr_$offset_t; { x,y size of bitmap } IN OUT groups : integer; IN OUT g_headers : gpr_$bmf_group_header_array_t; IN attribs : gpr_$attribute_desc_t;{ attributes bitmap is to have } OUT bitmap : gpr_$bitmap_desc_t; { returned bitmap descriptor } OUT created : boolean; { TRUE if we created the file } OUT status : status_$t );EXTERN;