1IM_OFFSETS45(3)            Library Functions Manual            IM_OFFSETS45(3)
2
3
4

NAME

6       im_offsets45,   im_offsets90,   im_rotate_imask45,   im_rotate_dmask45,
7       im_rotate_imask90, im_rotate_dmask90 - rotate square masks
8

SYNOPSIS

10       int *im_offsets45( size )
11       int size;
12
13       int *im_offsets90( size )
14       int size;
15
16       INTMASK *im_rotate_imask45( m, name )
17       INTMASK *m;
18       char *name;
19
20       DOUBLEMASK *im_rotate_dmask45( m, name )
21       DOUBLEMASK *m;
22       char *name;
23
24       INTMASK *im_rotate_imask90( m, name )
25       INTMASK *m;
26       char *name;
27
28       DOUBLEMASK *im_rotate_dmask90( m, name )
29       DOUBLEMASK *m;
30       char *name;
31
32

DESCRIPTION

34       These functions can be used to produce the integer  offsets  needed  to
35       rotate masks by 45 or 90 degrees clockwise.
36
37       im_offsets45()  accepts  only even size and returns a pointer to an int
38       buffer of size*size.  The program mallocs the buffer and puts  into  it
39       the  integer  offsets  needed  to rotate a mask of even size size by 45
40       degrees.  For instance if size is 3 the program returns the buffer 3  0
41       1   6 4 2  7 8 5 which is the offsets needed to rotate a mask with off‐
42       sets 0 1 2  3 4 5  6 7 8.  The function return a pointer to valid  data
43       on  success  or NULL on error.  Since the program mallocs a buffer, the
44       user should free the returned pointer accordingly.
45
46       im_offsets90() accepts any size and returns a pointer to an int  buffer
47       of  size*size.   The  program  mallocs  the buffer and puts into it the
48       integer offsets needed to rotate a mask of size  size  by  90  degrees.
49       For  instance  if size is 3 the program returns the buffer 6 3 0  7 4 1
50       8 5 2 which is the offsets needed to rotate a mask with offsets 0  1  2
51       3  4 5  6 7 8.  The function return a pointers to valid data on success
52       or NULL on error.  Since the program mallocs a buffer, the user  should
53       free the returned pointer accordingly.
54
55       im_rotate_imask45() rotates the INTMASK m by 45 degrees and returns the
56       rotated mask.  The filename member of the returned structure is set  to
57       name.   The program allocates memory for the new mask and therefore the
58       user must free the returned mask by a call  to  im_free_imask(3).   The
59       returned  mask is rotated by 45 degrees clockwise.  The function return
60       a valid INTMASK pointer on success or NULL on error.
61
62       im_rotate_dmask45() rotates the DOUBLEMASK m by 45 degrees and  returns
63       the rotated mask.  The filename member of the returned structure is set
64       to name.  The program allocates memory for the new mask  and  therefore
65       the  user  must  free  the returned mask by a call to im_free_dmask(3).
66       The returned mask is rotated by 45  degrees  clockwise.   The  function
67       return a valid DOUBLEMASK pointer on success or NULL on error.
68
69       im_rotate_imask90() rotates the INTMASK m by 90 degrees and returns the
70       rotated mask.  The filename member of the returned structure is set  to
71       name.   The program allocates memory for the new mask and therefore the
72       user must free the returned mask by a call  to  im_free_imask(3).   The
73       returned  mask is rotated by 90 degrees clockwise.  The function return
74       a valid INTMASK pointer on success or NULL on error.
75
76       im_rotate_dmask90() rotates the DOUBLEMASK m by 90 degrees and  returns
77       the rotated mask.  The filename member of the returned structure is set
78       to name.  The program allocates memory for the new mask  and  therefore
79       the  user  must  free  the returned mask by a call to im_free_dmask(3).
80       The returned mask is rotated by 90  degrees  clockwise.   The  function
81       return a valid DOUBLEMASK pointer on success or NULL on error.
82
83

RETURN VALUE

SEE ALSO

86       im_read_imask(3), im_read_dmask(3), im_free_imask(3), im_free_dmask(3),
87       im_gradient(3), im_compass(3), im_conv(3).
88
90       N. Dessipris
91

AUTHOR

93       N. Dessipris -28/05/1991
94
95
96
97                                  28 May 1991                  IM_OFFSETS45(3)
Impressum