接下来获得图像大小.... [英] getting image size next....

查看:58
本文介绍了接下来获得图像大小....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您的建议...

但是我需要获得图像高度,因为我会根据图像高度动态调整我的webcontrol的高度

。 br />
更多我只是有图片的url(相对parth)但在设计中

时间模式所有关于服务器或上下文的变量

ar not not集! ...所以我不能用MapPath函数来获得图片中的物理

... ...


所以我的第二个问题是如何在设计模式下检索VS.NET中加载的当前应用程序的

物理根路径(来自

相对路径)...


谢谢

Karim

Thanks for your advices...
but i need to get the Image height because i dynamically resize the height
of my webcontrol based on the image height.
More i just have the url (relative parth) to the the image but in design
time mode all variables concerning Server or Context
ar not set ! ...so I can''t use MapPath function to obtain the physical
parth of the picture ...

So my second question is how to retrieve the
physical root path of the current application loaded in VS.NET (from
relative path) in Design Mode...

Thanks
Karim

推荐答案

将图像读入内存流

load它进入一个System.Drawing.Image对象

一旦你这样做就可以找到图像的高度和宽度等


希望这有助于


-

问候,

高清

一旦成为极客......永远是个极客

" KarimL" <无***************** @ free.fr>在消息中写道

新闻:bv *********** @ biggoron.nerim.net ...
read the image into a memory stream
load it into a System.Drawing.Image object
once you do that you can find the height and width etc of the image

hope this helps

--
Regards,
HD
Once a Geek.... Always a Geek
"KarimL" <no*****************@free.fr> wrote in message
news:bv***********@biggoron.nerim.net...
感谢您的建议... <但是我需要获得图像高度,因为我根据图像高度动态调整web控件的高度。
更多我只是将图像的url(相对parth)放在图像中但是在设计
时间模式有关服务器或上下文的所有变量
未设置! ...所以我不能用MapPath函数来获取图片的实际部分...

所以我的第二个问题是如何检索
物理根在设计模式下在VS.NET中加载的当前应用程序的路径(来自
相对路径)...

Karim
Thanks for your advices...
but i need to get the Image height because i dynamically resize the height
of my webcontrol based on the image height.
More i just have the url (relative parth) to the the image but in design
time mode all variables concerning Server or Context
ar not set ! ...so I can''t use MapPath function to obtain the physical
parth of the picture ...

So my second question is how to retrieve the
physical root path of the current application loaded in VS.NET (from
relative path) in Design Mode...

Thanks
Karim


在Windows资源管理器中找到该文件,右键单击,属性,并查看

的位置?对不起我不知道我是否理解你,因为获得物理路径需要一个非常简单的任务。


- 迈克尔


" KarimL" <无***************** @ free.fr>在消息中写道

新闻:bv *********** @ biggoron.nerim.net ...
You find the file in windows explorer, right click, properties, and look at
the location? I''m sorry I don''t know if I''m understanding you, because
getting the physical path should be a pretty trivial task.

--Michael

"KarimL" <no*****************@free.fr> wrote in message
news:bv***********@biggoron.nerim.net...
感谢您的建议... <但是我需要获得图像高度,因为我根据图像高度动态调整web控件的高度。
更多我只是将图像的url(相对parth)放在图像中但是在设计
时间模式有关服务器或上下文的所有变量
未设置! ...所以我不能用MapPath函数来获取图片的实际部分...

所以我的第二个问题是如何检索
物理根在设计模式下在VS.NET中加载的当前应用程序的路径(来自
相对路径)...

Karim
Thanks for your advices...
but i need to get the Image height because i dynamically resize the height
of my webcontrol based on the image height.
More i just have the url (relative parth) to the the image but in design
time mode all variables concerning Server or Context
ar not set ! ...so I can''t use MapPath function to obtain the physical
parth of the picture ...

So my second question is how to retrieve the
physical root path of the current application loaded in VS.NET (from
relative path) in Design Mode...

Thanks
Karim


是的它可以,但它是一个复合的webcontrol

嵌入一个图像控件和它的属性是
$的网址b $ b image ...

所以在设计时它弹出ImageUrlEditor,我将结果字符串

值保存在一个字符串中并从

这个字符串我试图获得大小...

但是没有办法用这个图像组件获得图像大小...所以

其他解决方案我的问题如下......


Karim


" Michael Ramey" < raterus @本地> écritdansle message de

news:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
yes it could but it''s a composite webcontrol
that embeds an image control and on of its properties is the url of the
image...
so at design time it pops the ImageUrlEditor, i keep the resulting string
value in a string and from
this string I try to get the size...
but there''s no way to get the image size with this image component... so
other solution is my question below....

Karim

"Michael Ramey" <raterus@localhost> a écrit dans le message de
news:%2****************@TK2MSFTNGP10.phx.gbl...
您在Windows资源管理器中找到该文件,右键单击,属性,并在该位置查看
?对不起我不知道我是否理解你,因为获得实际路径应该是一项非常简单的任务。

- 迈克尔

KarimL <无***************** @ free.fr>在消息中写道
新闻:bv *********** @ biggoron.nerim.net ...
You find the file in windows explorer, right click, properties, and look at the location? I''m sorry I don''t know if I''m understanding you, because
getting the physical path should be a pretty trivial task.

--Michael

"KarimL" <no*****************@free.fr> wrote in message
news:bv***********@biggoron.nerim.net...
感谢您的建议...
但我需要获得图像高度,因为我根据图像高度动态调整我的webcontrol的
高度。
更多我只有图像的url(相对parth)但在设计中
时间模式有关服务器或上下文的所有变量
未设置! ...所以我不能用MapPath函数来获取图片的实际部分...

所以我的第二个问题是如何检索
物理根在设计模式下在VS.NET中加载的当前应用程序的路径(来自
相对路径)...

Karim
Thanks for your advices...
but i need to get the Image height because i dynamically resize the height of my webcontrol based on the image height.
More i just have the url (relative parth) to the the image but in design
time mode all variables concerning Server or Context
ar not set ! ...so I can''t use MapPath function to obtain the physical
parth of the picture ...

So my second question is how to retrieve the
physical root path of the current application loaded in VS.NET (from
relative path) in Design Mode...

Thanks
Karim



这篇关于接下来获得图像大小....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆