Comment on Login Screen – behind the scenesparentComments−eli13yDoes gravatar even give you that information back? I assumed the browser requested the image directly from them.−StavrosK13yIt gives you a 404 if the image doesn't exist, so you can use that. It's all in JS, anyway, so the gosquared server does't need to know any of this.−simontabor13yWe've got it so that the image 404's and we listen to the image error event to fade the G in or out.−eli13yNeat, good idea.−renownedmedia13yYou can specify a default image URI, and possibly look at the pixels of the returned image to see if it is the specified default.−pc8613yLook at the pixels?−kevincennis13ycanvas + getImageData−eli13yYou sure about that? I thought canvas enforced a same-origin policy−kevincennis13yAh, right. Good point.
Comments
Does gravatar even give you that information back? I assumed the browser requested the image directly from them.
It gives you a 404 if the image doesn't exist, so you can use that. It's all in JS, anyway, so the gosquared server does't need to know any of this.
We've got it so that the image 404's and we listen to the image error event to fade the G in or out.
Neat, good idea.
You can specify a default image URI, and possibly look at the pixels of the returned image to see if it is the specified default.
Look at the pixels?
canvas + getImageData
You sure about that? I thought canvas enforced a same-origin policy
Ah, right. Good point.