[Ssc-dev] packing & unpacking region redaction information.
Andrew Senior
andrew.senior at gmail.com
Wed Feb 1 22:58:29 EST 2012
Hi Harlo,
I just pushed a new version of JpegRedactionLibrary to github which can
take all the redaction region information, including the info needed to
unredact those regions, and pack it up into a
binary blob. If given a binary blob of such data it can unpack it and
reverse the redaction. This is still limited to blobs < 64KB, but shows
you how it could work.
Let me know if this is useful, or you need something different. I hope to
get rid of the size limit in the next day or two.
See the example code at:
https://github.com/asenior/Jpeg-Redaction-Library/blob/master/test/metadatatest.cpp#L77
it redacts an image "original" and the redaction data in redaction is
packed into a blob redaction_pack, which is then stored in the image and
saved.
std::vector<unsigned char> redaction_pack;
redaction.Pack(&redaction_pack);
printf("Packed redaction object is %d bytes\n", redaction_pack.size
());
original.SetObscuraMetaData(redaction_pack.size(),
&redaction_pack.front());
later on that process is reversed and the image is restored. As I
understand it you want to get the redaction_pack & encrypt it then add your
own metadata before passing it back as "ObscuraMetaData".
there's also this sample code
https://github.com/asenior/Jpeg-Redaction-Library/blob/master/test/test_utils.cpp#L162
called from here:
https://github.com/asenior/Jpeg-Redaction-Library/blob/master/test/test_redaction.cpp#L39
that does the same operation without the intermediate save to disk.
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mayfirst.org/pipermail/ssc-dev/attachments/20120201/7b464264/attachment.htm>
More information about the Ssc-dev
mailing list