目前通过Database.getMediaByHash(hash)只能获取手动添加的png等图像的NSData,如comments
中type=PaintNote
的对象,对于摘录只能返回类似如下的数据
[{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":154,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":165,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":176,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":187,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":198,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":209,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":220,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":231,"y":625}},{"page":4,"rect":{"_jsonvalueType":"CGRect","h":14,"w":11,"x":242,"y":625}}]
希望能够开放获取图片的api,返回含有位图数据的NSData,只需要类似手动复制(克隆)note得到的NSAttributedString中包含的png就可以了(参考mnanki)