Image display must be the same resize...

T

Trint Smith

I need to display an images from a database on my page that should
always be displayed as 200 pixels wide eventhough the actual images vary
in size...Can you help me?
Thanks,
Trint

.Net programmer
(e-mail address removed)
 
K

Ken Cox [Microsoft MVP]

Hi Trint,

I must be missing something, because it seems you could just hardcode the
size for the image control to be 200 pixels wide. That would force the size,
but it may distort:

<asp:Image id="Image1" runat="server"
ImageUrl="http://www.gc.ca/images/flag.gif" Width="200px"></asp:Image></P>

Could you explain further what you need?

Ken
MVP [ASP.NET]
 
A

Aaron Boodman

You can resample the images on the fly using stuff in System.Drawing. There
are tons of examples of this on the web.

http://groups.google.com/groups?hl=...ze+image&meta=group=microsoft.public.dotnet.*

--
Aaron


Ken Cox said:
Hi Trint,

I must be missing something, because it seems you could just hardcode the
size for the image control to be 200 pixels wide. That would force the size,
but it may distort:

<asp:Image id="Image1" runat="server"
ImageUrl="http://www.gc.ca/images/flag.gif" Width="200px"></asp:Image></P>

Could you explain further what you need?

Ken
MVP [ASP.NET]


Trint Smith said:
I need to display an images from a database on my page that should
always be displayed as 200 pixels wide eventhough the actual images vary
in size...Can you help me?
Thanks,
Trint

Net programmer
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top