You don't need to test that to see that it's not solvable. Hint: If you find a 2x2 square in your puzzle with two black and two white like this / or this , and you can toggle it without changing the numbers at all - then it's not uniquely solvable. Long diagonal lines without anything directly next to them always(!) have that issue: you can invert a part. Shouldn't be too hard to implement that test..
(There are more issues that are not as easy to detect - so please always test your puzzles)
Hint: Fill R1C14 and starting at this point, go diagonally in both sides till you reach the borders. There are no black pixels over these two diagonals. You will try to draw an impossible trident with base at C22 R9-13, pointing left & down.
http://images.hanjie-star.com/picross/d/7/optical-illusion-9e6f8d13645.png.
Hint:
If you find a 2x2 square in your puzzle with two black and two white like this / or this , and you can toggle it without changing the numbers at all - then it's not uniquely solvable. Long diagonal lines without anything directly next to them always(!) have that issue: you can invert a part.
Shouldn't be too hard to implement that test..
(There are more issues that are not as easy to detect - so please always test your puzzles)