cammy/include/cammy/photo.h

48 lines
1.1 KiB
C
Raw Normal View History

2016-05-14 23:40:28 -05:00
#ifndef _CAMMY_PHOTO_H
#define _CAMMY_PHOTO_H
#include <stdint.h>
#include <cammy/tile.h>
#define CAMMY_PHOTO_TILES_WIDTH 16
#define CAMMY_PHOTO_TILES_HEIGHT 14
#define CAMMY_PHOTO_WIDTH \
(CAMMY_TILE_WIDTH * CAMMY_PHOTO_TILES_WIDTH)
#define CAMMY_PHOTO_HEIGHT \
(CAMMY_TILE_HEIGHT * CAMMY_PHOTO_TILES_HEIGHT)
#define CAMMY_PHOTO_THUMB_TILES_WIDTH 4
#define CAMMY_PHOTO_THUMB_TILES_HEIGHT 4
#define CAMMY_PHOTO_INFO_SIZE 256
#pragma pack(1)
#pragma pack(push)
typedef struct _cammy_photo {
cammy_tile tiles[CAMMY_PHOTO_TILES_HEIGHT]
[CAMMY_PHOTO_TILES_WIDTH];
cammy_tile thumb[CAMMY_PHOTO_THUMB_TILES_HEIGHT]
[CAMMY_PHOTO_THUMB_TILES_WIDTH];
uint8_t info[CAMMY_PHOTO_INFO_SIZE];
} cammy_photo;
#pragma pack(pop)
2016-05-15 01:01:08 -05:00
void cammy_photo_export(cammy_photo *src, uint8_t *dest, int stride);
2016-05-14 23:40:28 -05:00
2016-05-15 01:01:08 -05:00
void cammy_photo_import(cammy_photo *dest, uint8_t *src, int stride);
2016-05-14 23:40:28 -05:00
2016-05-15 02:37:19 -05:00
void cammy_photo_dither(uint8_t *dest,
uint8_t *src,
size_t width,
size_t height,
2016-05-15 02:37:19 -05:00
int stride);
2016-05-14 23:40:28 -05:00
#endif /* _CAMMY_PHOTO_H */