NSData(PSDAdditions) Category Reference
+Declared in | +NSDataPSDAdditions.h NSDataPSDAdditions.m |
+
Tasks
+ + + + + +-
+
-
+
+
– packedBitsDescription
+Takes packedBits data and prints out a description of the packed contents by +running the decode operation and explaining via NSLog how the data is being +decoded. Useful for checking that packedBits data is correct.
+ + + + -
+
+
– packedBitsForRange:skip:
+A special version of packedBits which will take the data and pack every nth +value.
+ + + +
+
Instance Methods
+ +packedBitsDescription
+ + + +Takes packedBits data and prints out a description of the packed contents by +running the decode operation and explaining via NSLog how the data is being +decoded. Useful for checking that packedBits data is correct.
+- (NSString *)packedBitsDescription
Discussion
+Takes packedBits data and prints out a description of the packed contents by +running the decode operation and explaining via NSLog how the data is being +decoded. Useful for checking that packedBits data is correct.
+Declared In
+NSDataPSDAdditions.h
+
packedBitsForRange:skip:
+ + + +A special version of packedBits which will take the data and pack every nth +value.
+- (NSData *)packedBitsForRange:(NSRange)range skip:(int)skip
Parameters
+ +-
+
- skip: +
The number of bytes to advance as the data is encoded. Skip = 1 will +encode every byte, skip = 4 will encode every fourth byte, and so on.
+
-
+
- range: +
The range within the data object that should be encoded. Useful +for specifying a non-zero starting offset to get a certain channel encoded.
+
Discussion
+A special version of packedBits which will take the data and pack every nth +value.
+ +This is important for PSDWriter because it’s necessary to encode R, then G, +then B, then A data – so we essentially start at offset 0, skip 4, then do offset 1, +skip 4, etc… to compress the data with very minimal memory footprint.
+ +For normal packbits just to skip = 1
+Declared In
+NSDataPSDAdditions.h
+