Microsoft Content Management Server - Re: Custom ImagePlaceholder...Want to maintain aspect ratio of image, and make image c

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > July 2004 > Re: Custom ImagePlaceholder...Want to maintain aspect ratio of image, and make image c





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Custom ImagePlaceholder...Want to maintain aspect ratio of image, and make image c
Stefan [MSFT]

2004-07-28, 6:10 pm

Hi Alan,

MCMS does not expose the properties out of the box.

If it is a resource gallery item you could access the resource using the
OpenReadStream property and read it into an Image object.
Then you can read the width and height.

If it is a local image you would have to do an HttpRequest to request the
file, store the item in a memory file Stream and then read it into a Image
object and read the height and width value.


Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights.

MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver

MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Alan Taylor" <alan_taylor@nospam.uk.ibm.com> wrote in message
news:cidfg0p18gl1nlmo8s8ge77nmmtvhc01nk@
4ax.com...
> Thanks for the response.
>
> I guess what I'm trying to achive is a customer image placeholder that
> allows the user to select an image during authoring, and when
> published shows a thumbnail for the image (whose max height/width I
> chose) maintaining the aspect ratio, and allows the image to be
> clicked showing the full image in a new window.
>
> How am I able to get the height and width of the image?
>
> alan



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com