ext/rapngasm/rapngasm.cpp in rapngasm-1.0.1 vs ext/rapngasm/rapngasm.cpp in rapngasm-3.0.0

- old
+ new

@@ -49,12 +49,12 @@ template<> Object to_ruby< unsigned char* > (unsigned char* const & x) { unsigned char* const c = x; Array a; - for (unsigned int i = 0; i < sizeof(c); i++) - a.push(c[i]); + for (unsigned int i = 0; i < sizeof(c) ; i++) + a.push(to_ruby<unsigned char>(c[i])); return a; } template<> Object to_ruby< std::vector<APNGFrame> > (std::vector<APNGFrame> const & x) @@ -95,14 +95,20 @@ .define_method("delay_denominator", &APNGFrame::delayDen, (Arg("delay_denominator") = 0)); // .define_method("rows", &APNGFrame::rows, (Arg("rows") = NULL)); define_class<APNGAsm>("APNGAsmSuper") .define_constructor(Constructor<APNGAsm>()) - .define_method("version", &APNGAsm::version) .define_method("assemble", &APNGAsm::assemble) .define_method("disassemble", &APNGAsm::disassemble) + .define_method("load_animation_spec", &APNGAsm::loadAnimationSpec) + .define_method("save_pngs", &APNGAsm::savePNGs) + .define_method("save_json", &APNGAsm::saveJson) + .define_method("save_xml", &APNGAsm::saveXml) + //.define_method("set_apngasm_listener", &APNGAsm::setAPNGAsmListener) + .define_method("get_frames", &APNGAsm::getFrames) .define_method("frame_count", &APNGAsm::frameCount) - .define_method("reset", &APNGAsm::reset); + .define_method("reset", &APNGAsm::reset) + .define_method("version", &APNGAsm::version); define_class<RAPNGAsm, APNGAsm>("APNGAsm") .define_constructor(Constructor<RAPNGAsm>()) .define_method("add_frame", &RAPNGAsm::addFrameFromFrameObject, Arg("frame")) .define_method("add_frame_from_file", &RAPNGAsm::addFrameFromFile,