Friday Night Technical Open
The new “avatar” feature is really getting a workout; nearly 1,400 LGF lizards have uploaded their own personal graphics. Today I fixed several bugs in the uploading system, some small, some large.
I discovered that PHP’s image manipulation functions don’t like the files produced by Canon digital cameras, and possibly other types of JPG files with header information. PHP is so averse to some headers that it crashes, in fact, which is really not what you want to see. So I’m now using a nifty Linux utility called jhead to strip all EXIF headers or any other extraneous data from JPG files before processing them.
Congratulations to LGF reader “kawfytawk,” who discovered a bug today that resulted in a giant icon, much larger than the intended 24x24 image. This bug has been fixed and the loophole plugged.
I also found a problem with the way files were being named after uploading, that could cause a user’s image files to be wiped out in certain circumstances; this one is also fixed.
And one more tiny enhancement: if you use a graphics program to create a 24x24 icon, and upload a JPG at that size, the file you upload will be used “as is,” without being regenerated. This way you can optimize an icon file for maximum sharpness, and it won’t be degraded by the conversion process.
Note, however, that there is one advantage of uploading a larger icon and letting the LGF Blog Engine scale it down: if you do it that way, there are two versions of your image stored on our server, the original larger version and the icon-sized 24x24 version. Your personal profile page shows the larger version, and the smaller version shows in your comment headers. If you scale it down to 24x24 before uploading, the same small icon will show up in your profile page and comment headers.
UPDATE at 12/14/07 6:17:55 pm:
Important! After uploading a new icon, you may need to use your browser’s “refresh” function in order to see the new image, because of the browser cache. Some browsers may even require emptying the cache and refreshing to see the new image.