Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image RenderContent Method
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01326440
Message ID:
01326607
Views:
21
>>>>I want to create a custom Image control which overrides the RenderContent event. In the RenderContent handler I want to manipulate the bitmap before actually rendering it. My only problem is I do not find any content property (Bitmap) to manipulate. The Images which I am tweaking are at a different URL than the current ASP process. Something like "http://anthology.com/Covers/BOOK_JACKETS03302007/Thumbs/FC1558533729.JPG"
>>>>
>>>>Once I can get my hands on the Bitmap I can return it to the Response stream after some watermarking or other manipulation. I can handle the graphics stuff, but I do not know how to get my hands on the content.
>>>>
>>>
>>>Images are rendered on the client, not on the server - hence no way to get a bitmap of it on the server. That is, the server control just returns the URL as HTML markup to the client (which then goes out and pulls down the image and renders it). I'd suggest just creating something like an ASHX handler and adjust the existing image controls to point to it instead, ex. the img src URL becomes something like /GetImage.ashx?img=ImageName.jpg . Inside of the ASHX load the bitmap and do your adjustments then return it into the response stream.
>>
>>Thanks Paul, how do you recommend I load the bitmap in the ASHX?
>>
>
>Is the file local to this machine or on another machine? If it's on another machine, does the web server have a file share to it (or is the only way through http?)


The files may be on this server or on another machine in our network. At this time I do not know how to access directories outside the current web structure, so as far as having share access, I am not clear on this. It would be most convenient to use the URL's which are already present.

Thanks

Glenn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform