Unplanned
Last Updated: 20 Nov 2013 15:58 by Keith
Keith
Created on: 20 Aug 2013 15:53
Category: BinaryImage
Type: Feature Request
1
Programmatic API for using RadBinaryImage to handle direct requests for images
I'd like to be able to instantiate and databind a RadBinaryImage, then call a "GetUri" method on the instance to get the WebResource URI that would be generated in markup if the control were added to the page.

In a particular use case, this would allow putting the URI in a meta tag for OpenGraph calls.

An additional API method that would be handy would be a "handler" mode that would allow instantiation of a RadBinaryImage in a custom IHttpHandler implementation, and then serving that request from the final image (after scaling and cropping) generated by the RadBinaryImage control. I could see this taking two forms:

* GetMimeType and GetBytes methods, which could be used to manually populate the Response.
* a Respond method which would take an HttpContext argument, and would set appropriate headers, stream the image, and end the request itself.
0 comments