Accessing Media properties directly from a handler files (ashx)
I'm looking to move a site over to Umbraco (any version) that has a heavily customised image handler that I wrote a long time ago for an ASP.NET 2.0 Web Form site. The handler allows scaling, cropping, and intelligent cropping (based on the known location and size of the focal point), while rendering as an image, bordered image, simulated mounted print, or simulated mounted slide.
There should be no problem reproducing all of the properties and updating the handler to read from the media location (rather than a filestream column), including passing the title and label format and position. But I don't want there to be any way to manipulate the querystring to produce a large copy without the copyright – which is why, over a certain size, the current handler applies a default label (if one hasn't been selected) based on the copyright details read directly from the DB.
I know I need to explore Umbraco more deeply but can anyone kickstart the process and explain (or point me in the direction of a resource detailing) what I need to do to go about accessing a property directly from the handler?
Accessing Media properties directly from a handler files (ashx)
I'm looking to move a site over to Umbraco (any version) that has a heavily customised image handler that I wrote a long time ago for an ASP.NET 2.0 Web Form site. The handler allows scaling, cropping, and intelligent cropping (based on the known location and size of the focal point), while rendering as an image, bordered image, simulated mounted print, or simulated mounted slide.
There should be no problem reproducing all of the properties and updating the handler to read from the media location (rather than a filestream column), including passing the title and label format and position. But I don't want there to be any way to manipulate the querystring to produce a large copy without the copyright – which is why, over a certain size, the current handler applies a default label (if one hasn't been selected) based on the copyright details read directly from the DB.
I know I need to explore Umbraco more deeply but can anyone kickstart the process and explain (or point me in the direction of a resource detailing) what I need to do to go about accessing a property directly from the handler?
Thanks
Steffan,
There are already a few image manipulation projects for umbraco that you can use see
http://our.umbraco.org/projects/backoffice-extensions/v70-image-cropper
http://our.umbraco.org/projects/website-utilities/slimsy
http://our.umbraco.org/projects/developer-tools/imageresizer
To name a few take a look at the projects section on our.umbraco there are plenty around.
Regards
Ismail
Thanks, I'll dig through their code as I'm sure I won't find one that can add anything like the following adornments:
is working on a reply...