Permalink
Browse files

cdl channel charcoal comment

  • Loading branch information...
1 parent 0845b8c commit 0155205166d40bcb34463de30f9ceeff3fbad0be @tjfontaine committed Dec 26, 2011
Showing with 49 additions and 4 deletions.
  1. +45 −4 src/image.cc
  2. +4 −0 src/image.h
View
@@ -258,6 +258,47 @@ ImagickImage::blurChannel(const Arguments &args)
return args.This();
}
+Handle<Value>
+ImagickImage::cdl(const Arguments &args)
+{
+ HandleScope scope;
+ ENSURE(String, 0);
+ ImagickImage *image = IUNWRAP(args.This());
+ TRY_CATCH(image->image_.cdl(to_string(args[0])));
+ return args.This();
+}
+
+Handle<Value>
+ImagickImage::channel(const Arguments &args)
+{
+ HandleScope scope;
+ ENSURE(Number, 0);
+ ImagickImage *image = IUNWRAP(args.This());
+ TRY_CATCH(image->image_.channel((MagickCore::ChannelType)args[0]->Uint32Value()));
+ return args.This();
+}
+
+Handle<Value>
+ImagickImage::charcoal(const Arguments &args)
+{
+ HandleScope scope;
+ ENSURE(Number, 0);
+ ENSURE(Number, 1);
+ ImagickImage *image = IUNWRAP(args.This());
+ TRY_CATCH(image->image_.charcoal(args[0]->NumberValue(), args[1]->NumberValue()));
+ return args.This();
+}
+
+Handle<Value>
+ImagickImage::comment(const Arguments &args)
+{
+ HandleScope scope;
+ ENSURE(String, 0);
+ ImagickImage *image = IUNWRAP(args.This());
+ TRY_CATCH(image->image_.comment(to_string(args[0])));
+ return args.This();
+}
+
void
ImagickImage::Initialize(Handle<Object> target)
{
@@ -292,14 +333,14 @@ ImagickImage::Initialize(Handle<Object> target)
IMAGICK_PROTOTYPE(t, addNoiseChannel);
IMAGICK_PROTOTYPE(t, blur);
IMAGICK_PROTOTYPE(t, blurChannel);
+ IMAGICK_PROTOTYPE(t, cdl);
+ IMAGICK_PROTOTYPE(t, channel);
+ IMAGICK_PROTOTYPE(t, charcoal);
+ IMAGICK_PROTOTYPE(t, comment);
NODE_SET_PROTOTYPE_METHOD(t, "affineTransform", NotImplemented);
NODE_SET_PROTOTYPE_METHOD(t, "annotate", NotImplemented);
- NODE_SET_PROTOTYPE_METHOD(t, "cdl", NotImplemented);
- NODE_SET_PROTOTYPE_METHOD(t, "channel", NotImplemented);
- NODE_SET_PROTOTYPE_METHOD(t, "charcol", NotImplemented);
NODE_SET_PROTOTYPE_METHOD(t, "colorize", NotImplemented);
- NODE_SET_PROTOTYPE_METHOD(t, "comment", NotImplemented);
NODE_SET_PROTOTYPE_METHOD(t, "compare", NotImplemented);
NODE_SET_PROTOTYPE_METHOD(t, "composite", NotImplemented);
NODE_SET_PROTOTYPE_METHOD(t, "contrast", NotImplemented);
View
@@ -78,6 +78,10 @@ class ImagickImage : public node::ObjectWrap
IMAGICK_P(addNoiseChannel);
IMAGICK_P(blur);
IMAGICK_P(blurChannel);
+ IMAGICK_P(cdl);
+ IMAGICK_P(channel);
+ IMAGICK_P(charcoal);
+ IMAGICK_P(comment);
};
#endif

0 comments on commit 0155205

Please sign in to comment.