remove unused vars
remove unused var
warning fixes, code cleanup
take in account BytesPerPixel, update to new image color method
fixed to take in account padded pixels
use standard image code
refactor isColor to hasColor
fix curves view again
remove unused vars and code cleanup