28th March 2008, 4:51 AM
What do you think Mr. Miller?
I created a dynamic request handler in .net for the new forum software.
It dynamically renders an image as a explorer type thumbnail for a file. Using the currently associated icon for a file on the web server.
I wanted to create a component that would render post attachment thumbnails for the new forum software with out having to upload a image for every file type.
For example:
ImageFileHandler.ashx?I='/UserAvitars/Ryan-Avitar.gif'&drawmode='thumnail'
Generates:
![[Image: Ryan%20-%20Avitar.gif%27&drawmode=%27thumnail%27]](http://tcforums.tovennet.net/ImageFileHandler.ashx?I=%27%7E/UserAvitars/Ryan%20-%20Avitar.gif%27&drawmode=%27thumnail%27)
And For Example:
ImageFileHandler.ashx?I='/UserAvitars/Ryan-Avitar.gif'&drawmode='Icon'
Generates:
![[Image: Ryan%20-%20Avitar.gif%27&drawmode=%27icon%27]](http://tcforums.tovennet.net/ImageFileHandler.ashx?I=%27%7E/UserAvitars/Ryan%20-%20Avitar.gif%27&drawmode=%27icon%27)
And For Example:
ImageFileHandler.ashx?I='/UserAvitars/Ryan-Avitar.gif'&drawmode='largeicon'
Renders:
![[Image: Ryan%20-%20Avitar.gif%27&drawmode=%27largeicon%27]](http://tcforums.tovennet.net/ImageFileHandler.ashx?I=%27%7E/UserAvitars/Ryan%20-%20Avitar.gif%27&drawmode=%27largeicon%27)
Details:
Just put the image hander as the SRC for an image tag. The 'I' query string specifies the virtual path to the file and the 'drawmode' query string specifies render parameters.
Limitations:
I created a dynamic request handler in .net for the new forum software.
It dynamically renders an image as a explorer type thumbnail for a file. Using the currently associated icon for a file on the web server.
I wanted to create a component that would render post attachment thumbnails for the new forum software with out having to upload a image for every file type.
For example:
ImageFileHandler.ashx?I='/UserAvitars/Ryan-Avitar.gif'&drawmode='thumnail'
Generates:
![[Image: Ryan%20-%20Avitar.gif%27&drawmode=%27thumnail%27]](http://tcforums.tovennet.net/ImageFileHandler.ashx?I=%27%7E/UserAvitars/Ryan%20-%20Avitar.gif%27&drawmode=%27thumnail%27)
And For Example:
ImageFileHandler.ashx?I='/UserAvitars/Ryan-Avitar.gif'&drawmode='Icon'
Generates:
![[Image: Ryan%20-%20Avitar.gif%27&drawmode=%27icon%27]](http://tcforums.tovennet.net/ImageFileHandler.ashx?I=%27%7E/UserAvitars/Ryan%20-%20Avitar.gif%27&drawmode=%27icon%27)
And For Example:
ImageFileHandler.ashx?I='/UserAvitars/Ryan-Avitar.gif'&drawmode='largeicon'
Renders:
![[Image: Ryan%20-%20Avitar.gif%27&drawmode=%27largeicon%27]](http://tcforums.tovennet.net/ImageFileHandler.ashx?I=%27%7E/UserAvitars/Ryan%20-%20Avitar.gif%27&drawmode=%27largeicon%27)
Details:
Just put the image hander as the SRC for an image tag. The 'I' query string specifies the virtual path to the file and the 'drawmode' query string specifies render parameters.
Limitations:
- I could not get transparent spots to render properly so for now it renders as a jpeg.
- If your server has crappy icons 'like my 2000 advanced server', thats what it renders.