|
Home > Archive > Microsoft Content Management Server > June 2005 > Problem getting dimensions of an image in a Posting
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 |
Problem getting dimensions of an image in a Posting
|
|
| N E Asmundvaag 2005-06-28, 7:49 am |
| Hello
I hope someone can help me with this.
I want to get the height and width of an image in a Posting. The image
is stored in an ImagePlaceholder, but it is not stored in the Resource
Gallery.
I have found a description in this group saying I must use an HTTP
request to get the image via the URL in the Src property. However,
when I try this I only get a 401 Unauthorized error.
Does anyone know a way to get around this?
Regards
Nils E Asmundvaag
| |
| Stefan [MSFT] 2005-06-28, 7:49 am |
| Hi Nils,
the only way to achieve this is to do a HttpWebRequest to the URL of the
resource and consume the response stream in an Image object.
Then check the dimensions on the image object.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"N E Asmundvaag" <nea@zocas.no> wrote in message
news:cd1df3e5.0506280112.40bf2310@posting.google.com...
> Hello
>
> I hope someone can help me with this.
>
> I want to get the height and width of an image in a Posting. The image
> is stored in an ImagePlaceholder, but it is not stored in the Resource
> Gallery.
>
> I have found a description in this group saying I must use an HTTP
> request to get the image via the URL in the Src property. However,
> when I try this I only get a 401 Unauthorized error.
>
> Does anyone know a way to get around this?
>
> Regards
>
> Nils E Asmundvaag
| |
| Chester Ragel 2005-06-28, 7:49 am |
| Hi Nils,
This may help you -
http://chestermr.blogspot.com/2005/...rce-stream.html
Cheers,
Chester.
"N E Asmundvaag" <nea@zocas.no> wrote in message
news:cd1df3e5.0506280112.40bf2310@posting.google.com...
> Hello
>
> I hope someone can help me with this.
>
> I want to get the height and width of an image in a Posting. The image
> is stored in an ImagePlaceholder, but it is not stored in the Resource
> Gallery.
>
> I have found a description in this group saying I must use an HTTP
> request to get the image via the URL in the Src property. However,
> when I try this I only get a 401 Unauthorized error.
>
> Does anyone know a way to get around this?
>
> Regards
>
> Nils E Asmundvaag
| |
| N E Asmundvaag 2005-06-28, 5:52 pm |
| "Chester Ragel" <Chesterr@Gmail.Com> wrote in message news:<OdG5O#8eFHA.228@TK2MSFTNGP12.phx.gbl>...
> Hi Nils,
>
> This may help you -
> http://chestermr.blogspot.com/2005/...rce-stream.html
>
Hello Chester,
This was exactly what I was looking for. Thank you very much!
Just a follow-up question: What permissions do the user used in the
NetworkCredential need? I am thinking of creating a new user for this
use.
Regards
Nils Erik
| |
| Stefan [MSFT] 2005-06-28, 5:52 pm |
| Hi Nils,
the user needs to have subscriber access to the image the URL points to.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"N E Asmundvaag" <nea@zocas.no> wrote in message
news:cd1df3e5.0506280530.22dc93f6@posting.google.com...
> "Chester Ragel" <Chesterr@Gmail.Com> wrote in message
> news:<OdG5O#8eFHA.228@TK2MSFTNGP12.phx.gbl>...
>
> Hello Chester,
>
> This was exactly what I was looking for. Thank you very much!
>
> Just a follow-up question: What permissions do the user used in the
> NetworkCredential need? I am thinking of creating a new user for this
> use.
>
> Regards
> Nils Erik
|
|
|
|
|