DescriptionTest region decoding in skimage, plus fixes.
Add tests in skimage to perform region decoding. Write out a
PNG of the region as well as a bitmap obtained with extractSubset
for comparison.
Rename decodeRegion to decodeSubset, so it will not be confused
with SkRegion. (Leave a function called decodeRegion which calls
decodeSubset.)
Clean up some comments.
Use png_set_interlaced_pass instead of modifying pass directly.
Make some changes to region decoding to fix problems I discovered
during testing:
Only call getAddr within a valid range.
Check for a NULL fInputStream.
Return a boolean for whether cropBitmap succeeded.
In cropBitmap, do not attempt to draw to a bitmap to an Index8
bitmap, which crashes. Use extractSubset instead.
Remove an assert.
R=djsollen@google.com
Committed: https://code.google.com/p/skia/source/detail?r=8996
Patch Set 1 #
Total comments: 8
Patch Set 2 : Respond to comments #
Total comments: 2
Patch Set 3 : Small comment fix. #
Messages
Total messages: 6 (0 generated)
|