Developer World
Spresense Arduino Library
v3.3.0-b2e6327
NetPBM.h
1
/*
2
* NetPBM.h - NetPBM include file for the Spresense SDK
3
* Copyright 2018 Sony Semiconductor Solutions Corporation
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
20
#ifndef Netpbm_h
21
#define Netpbm_h
22
23
#include <
File.h
>
24
25
class
NetPBM
{
26
public
:
27
NetPBM
(
File
& file);
28
~NetPBM
();
29
30
size_t
size();
31
void
size(
unsigned
short
*width,
unsigned
short
*height);
32
unsigned
int
getpixel(
unsigned
short
row,
unsigned
short
col);
33
34
private
:
35
36
int
parse();
37
int
parse_type(
char
*buf);
38
char
*getline(
char
*buf);
39
40
unsigned
char
*_pixbuf;
41
unsigned
char
*_filebuf;
42
unsigned
short
_width;
43
unsigned
short
_height;
44
unsigned
char
_bpp;
45
unsigned
char
_maxvalue;
46
bool
_isascii;
47
};
48
49
#endif
// Netpbm_h
File.h
SPRESENSE Arduino File library.
File
The File class allows for reading from and writing to individual files on the File System.
Definition:
File.h:55
NetPBM
Definition:
NetPBM.h:25
NetPBM
NetPBM.h
Generated by
1.9.4