Fix for 3px square image, add object output option

In testing with a 4px square and 3px quare pure red image, the 3px had incorrect values, fixed
added option to return data as objects instead of strings