Dagnabit - a slight hitch in the road, but still expect beta 2 today « home
posted on 17:12 - 19 July 2009 | posted by Lev
Well, I was going through the few things that I felt I really needed to include in this update, and one of them is theme-based rounded corner support for profile/avatar images, much like Theia currently has with icons and awards.
Anyhow, I didn't take something into consideration when I had planned this. That being that profile images can be gif, png or jpg.
So at first glance it appeared as though rounding corners in profiles was finished within a few minutes of implementing the new code, but then after I refreshed the page, I noticed the corners on my profile image became colored; yet this didn't happen for the default profile image that everyone else has. The reason the images looked fine on the initial page load was because the image I was seeing was a dynamic GD image without a physical location yet, which was being read from memory. Refreshing the page, causes Theia to load up the cached file instead of rebuilding the image, in which case the cached file will be a physical file.
Then it struck me (it took me a while considering how obvious it should have been): my profile image is .jpg, and Theia is told to re-save profile images in the format they were originally.
This won't work with rounded corners, though, since jpg images do not support transparency (and I use pngs over gifs because pngs can be true color unlike gif images which are always pallet-based).
So now I have to go through the code that creates resizes/caches the member's picture, and change it so that the resulting image is always a png (in order to support transparency).
This won't mean a thing for people using Theia, since the site will still allow the same formats, but in the background it will be converting profile images to pngs, for transparency support in themes.
Anyhow, just wanted to post a small update. I should have this little hurdle taken care of in under an hour, so after that I just need to run a test install, and a test update, and then I will post the new release!
Anyhow, I didn't take something into consideration when I had planned this. That being that profile images can be gif, png or jpg.
So at first glance it appeared as though rounding corners in profiles was finished within a few minutes of implementing the new code, but then after I refreshed the page, I noticed the corners on my profile image became colored; yet this didn't happen for the default profile image that everyone else has. The reason the images looked fine on the initial page load was because the image I was seeing was a dynamic GD image without a physical location yet, which was being read from memory. Refreshing the page, causes Theia to load up the cached file instead of rebuilding the image, in which case the cached file will be a physical file.
Then it struck me (it took me a while considering how obvious it should have been): my profile image is .jpg, and Theia is told to re-save profile images in the format they were originally.
This won't work with rounded corners, though, since jpg images do not support transparency (and I use pngs over gifs because pngs can be true color unlike gif images which are always pallet-based).
So now I have to go through the code that creates resizes/caches the member's picture, and change it so that the resulting image is always a png (in order to support transparency).
This won't mean a thing for people using Theia, since the site will still allow the same formats, but in the background it will be converting profile images to pngs, for transparency support in themes.
Anyhow, just wanted to post a small update. I should have this little hurdle taken care of in under an hour, so after that I just need to run a test install, and a test update, and then I will post the new release!

Related Items »






