aboutsummaryrefslogtreecommitdiff
path: root/sys/imfort/imgsiz.x
blob: c8161286fc9539a45a238cea85f788e6d06df44b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<imhdr.h>
include	"imfort.h"

# IMGSIZ -- Get the physical attributes (size and type) of an image.

procedure imgsiz (im, axlen, naxis, pixtype, ier)

pointer	im			# image descriptor
int	axlen[IM_MAXDIM]	# receives axis lengths
int	naxis			# receives number of axes
int	pixtype			# receives pixel type
int	ier			# receives error status

bool	strne()

begin
	if (strne (IM_MAGIC(im), "imhdr"))
	    ier = IE_MAGIC
	else {
	    call amovl (IM_LEN(im,1), axlen, IM_MAXDIM)
	    naxis = IM_NDIM(im)
	    pixtype = IM_PIXTYPE(im)
	    ier = OK
	}
end