开发者

Compare bytearrays in ActionScript 3

I开发者_运维技巧've an image (JPEG) converted to a ByteArray in ActionScript. The SWF loads another image: I want to know if the loaded image is identical to the one I converted to a ByteArray. Is it possibile/safe to compare two ByteArrays as they were two strings? Or is it any other way to do it?


It's probably possible (have you tried it?) but I would compare the images instead (i.e. using BitmapData.compare) since it's what matters (different jpeg algorithms result in different bytes, but almost identical images). Plus, comparing the images you could set quite a "natural" threshold of similarity.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜