Made some changes for images specefic to 4 channel images

Fix for Bug #3634

Made some changes specefic to 4 channel images

Made some changes specefict to 4 channel images

Made some changes specefict to 4 channel images. Fixed step value for tptr