• Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Members
  • Team
  • Help
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Members Team Help
    Tendo City Tendo City: Metropolitan District Ramble City Fun with request handlers :)

     
    • 0 Vote(s) - 0 Average
    Fun with request handlers :)
    etoven
    Offline

    Site Owner Operator

    Posts: 2,049
    Threads: 586
    Joined: 01-04-2019
    #1
    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]




    And For Example:

    ImageFileHandler.ashx?I='/UserAvitars/Ryan-Avitar.gif'&drawmode='Icon'

    Generates:

    [Image: 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]



    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:


    1. I could not get transparent spots to render properly so for now it renders as a jpeg.
    2. If your server has crappy icons 'like my 2000 advanced server', thats what it renders.
    Reply
    Reply
    lazyfatbum
    Offline

    Administrator

    Posts: 4,354
    Threads: 222
    Joined: 09-21-1999
    #2
    28th March 2008, 6:15 AM
    *high 5's etoven*

    *high 5's miller*

    *has no idea what's going on*

    "ferret masturbation" is no where near as pleasant as it sounds.
    Reply
    Reply
    DMiller
    Offline

    Super Moderator

    Posts: 587
    Threads: 14
    Joined: 10-01-1999
    #3
    28th March 2008, 9:05 PM
    Took me a bit to figure out why you were doing this, but now it makes sense. I've always had problems with transparency in .NET so it doesn't surprise me that you had trouble with that too. The way they handle transparency seems weird compared to every other program I use. Anyway, that's pretty cool and I even got a high five out of it without doing anything.
    <a href=http://www.derekmiller.us/>My Website (In A Constant State of Construction)</a>
    [Image: smashCard.png]
    Reply
    Reply
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)



    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Toven Solutions

    Home · Members · Team · Help · Contact

    408 Chapman St. Salem, Viriginia

    +1 540 4276896

    etoven@gmail.com

    About the company Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Linear Mode
    Threaded Mode