It only returns failure (1) when the parameters are incorrect. Though you may check if the resized file was created to see if the original was a jpg picture.
Picture Resizer Exit codes
Does picture resizer use exit codes?
Does Picture resizer use exit codes and what are they?
I want to use this on pictures that a client uploads to his site to shrink them and verify they are a real picture before moving them to the live site.