Enable creating NativeImage from PNG and JPEG

This commit is contained in:
Cheng Zhao 2015-02-11 18:02:59 +08:00
parent 53fca43d89
commit 85f5ef2ab1
2 changed files with 27 additions and 5 deletions

View file

@ -19,11 +19,15 @@ namespace api {
class NativeImage : public mate::Wrappable {
public:
static mate::Handle<NativeImage> Create(v8::Isolate* isolate,
const gfx::Image& image);
static mate::Handle<NativeImage> Create(
v8::Isolate* isolate, const gfx::Image& image);
static mate::Handle<NativeImage> CreateFromPNG(
v8::Isolate* isolate, v8::Handle<v8::Value> buffer);
static mate::Handle<NativeImage> CreateFromJPEG(
v8::Isolate* isolate, v8::Handle<v8::Value> buffer);
protected:
NativeImage(const gfx::Image& image);
explicit NativeImage(const gfx::Image& image);
virtual ~NativeImage();
// mate::Wrappable: