allow loading of std::string, README update
This commit is contained in:
parent
dfeafa3368
commit
1049c8e383
3 changed files with 7 additions and 0 deletions
|
@ -35,4 +35,5 @@ RagePhoto::Error error = ragePhoto.error();
|
|||
|
||||
```bash
|
||||
ragephoto-extract PGTA5123456789 photo.jpg
|
||||
ragephoto-extract PRDR3123456789 photo.jpg
|
||||
```
|
||||
|
|
|
@ -349,6 +349,11 @@ bool RagePhoto::load(const char *data, size_t length)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool RagePhoto::load(const std::string &data)
|
||||
{
|
||||
return load(data.data(), data.size());
|
||||
}
|
||||
|
||||
RagePhoto::Error RagePhoto::error()
|
||||
{
|
||||
return p_error;
|
||||
|
|
|
@ -72,6 +72,7 @@ public:
|
|||
~RagePhoto();
|
||||
void clear();
|
||||
bool load(const char *data, size_t length);
|
||||
bool load(const std::string &data);
|
||||
Error error();
|
||||
const char *photoData();
|
||||
const uint32_t photoSize();
|
||||
|
|
Loading…
Reference in a new issue