-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimageiolib.h
More file actions
30 lines (22 loc) · 745 Bytes
/
imageiolib.h
File metadata and controls
30 lines (22 loc) · 745 Bytes
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
#ifndef IMAGEIOLIB_H
#define IMAGEIOLIB_H
#include <string>
#include <QLayout>
#include "main.h"
/**
* @brief readImage Reads data from .bmp file on disk, loads into an Image struct
*
* @param fileName name of file to read
* @return Image struct with data from file
*
* @warning File on disk must be of dimensions IMG_HEIGHT x IMG_WIDTH
*/
Image readImage(const std::string fileName);
/**
* @brief displayImage Draws an image to an existing window
* Also saves the image to a file
* @param theImage image struct to draw
* @param caption what text to display next to image - also used as filename
*/
void displayImage(const Image& theImage, std::string caption, QLayout& mainGrid);
#endif // IMAGEIOLIB_H