-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImageList.h
54 lines (41 loc) · 1.88 KB
/
ImageList.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*********************************************************************/
/* Homework Assignment 5, for EECS 22, Fall 2016 */
/* */
/* Author: Tim Schmidt */
/* Date: 11/13/2016 */
/* */
/* ImageList.h: header file for image list manipulations */
/* */
/*********************************************************************/
#ifndef IMAGELIST_H
#define IMAGELIST_H
#include "Image.h"
typedef struct ImageEntry IENTRY;
typedef struct ImageList ILIST;
struct ImageEntry {
ILIST *List; /* Pointer to the list which this entry belongs to */
IENTRY *Next; /* Pointer tot he next entry, or NULL */
IENTRY *Prev; /* Pointer to the previous entry, or NULL */
IMAGE *RGBImage; /* Pointer to the RGB image, or NULL */
YUVIMAGE *YUVImage; /* Pointer to the YUV image, or NULL */
};
struct ImageList {
unsigned int Length; /* Length of the list */
IENTRY *First; /* Pointer to the first entry, or NULL */
IENTRY *Last; /* Pointer to the last entry, or NULL */
};
/* Create a new image list */
ILIST *CreateImageList(void);
/* Delete an image list (and all entries) */
void DeleteImageList(ILIST *list);
/* Insert a RGB image to the image list at the end */
void AppendRGBImage(ILIST *list, IMAGE *RGBimage);
/* Insert a YUV image to the image list at the end */
void AppendYUVImage(ILIST *list, YUVIMAGE *YUVimage);
/* Crop an image list */
void CropImageList(ILIST *list, unsigned int start, unsigned int end);
/* Fast forward an image list */
void FastImageList(ILIST *list, unsigned int factor);
/* Reverse an image list */
void ReverseImageList(ILIST *list);
#endif