Okay, they would have mentioned leave to appeal if it was given. You can assume it was not.
You can submit a fresh application now with the correct format of photograph, though you are out of time sometimes the UKBA exercise common sense and grant the visa. You may or may not get it, but it is probably worth trying. I have had clients in similar circumstances be granted visas without the UKBA rejecting the second application but I'm afraid there is a lack of consistency so there is no guarantee of success.
A further complication, if it applies to you, is that you will be taken to have the points you have at the date of the second application. If that means that the points you have a decreased by 5 as a result of your recent birthday then this is a further reason which they might choose to reject, but, again, you can hope that they exercise their discretion on the basis of common sense.
If you choose to submit the second application then I would do so with an extensive covering letter explaining the previous application and the reasons why you incorrectly sent the wrong photo (honest mistake, a misapprehension of the requirements etc), attempting to appeal to their sense of fairness and common sense.
Had you not overstayed (although I accept this was out of your control to an extent) for 28 days then I would advise you to return home and make the application from there. The difficulty is that you have technically overstayed longer than 28 days and as such this is now a general ground of refusal that the UKBA could avail themselves of if you make an application out of country from home.
Sorry to say, but this is a complicated situation you are in. I would have thought, particularly as they have refunded your fee, that a further application in country would be worth a shot.
If this is useful please kindly click accept so that I may be rewarded for my time. You will be free to ask for follow up questions.