Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Images & ASP.NET
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Images & ASP.NET

 Post Reply Post Reply
Author
neotrix View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 November 2003
Location: Pakistan
Status: Offline
Points: 433
Post Options Post Options   Thanks (0) Thanks(0)   Quote neotrix Quote  Post ReplyReply Direct Link To This Post Topic: Images & ASP.NET
    Posted: 15 October 2004 at 12:09am
Hello,
I dont really know asp.net very well, i just am good in classic asp. But i want to ask these three questions if anyone here can answer me please

  1. Can i make thumbnails of imagins using asp.net ?!?
  2. will that require a component just like classic asp ??!
  3. can i add a water mark over images displayed in my site using asp.net ??!
All i know right now is that my site supports .net but i dont know how to make thumbnails using asp.net, if someon can plz give me a link to a page or something where i can find an easy way of learning to convert full images to their thumbnails ?!?

Thanks in Advance.
Allah Hafiz!
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2004 at 5:15pm
  1. yes, very easily
  2. nope, all built in
  3. yes, also built in functionality


I have some code that does exactly that, let me know if you want to see...
Back to Top
neotrix View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 November 2003
Location: Pakistan
Status: Offline
Points: 433
Post Options Post Options   Thanks (0) Thanks(0)   Quote neotrix Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2004 at 6:14am
ummmmm... how do i resize images ?!?
any easy way ?!?
Back to Top
neotrix View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 November 2003
Location: Pakistan
Status: Offline
Points: 433
Post Options Post Options   Thanks (0) Thanks(0)   Quote neotrix Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2004 at 8:26am
Ohk, here'z the code

<%@Import Namespace="System.Drawing.Imaging" %>
<script language="VB" runat="server">
  Sub Page_Load(sender as Object, e as EventArgs)
 
    'Read in the image filename to create a thumbnail of
    Dim imageUrl as String = Request.QueryString("img")
   
    'Make sure that the image URL doesn't contain any /'s or \'s
    If imageUrl.IndexOf("/") >= 0 Or imageUrl.IndexOf("\") >= 0 then
      'We found a / or \
      Response.End()
    End If
   
    'Add on the appropriate directory
    imageUrl = "/images/" & imageUrl
   
    'Get the image.   
    Dim fullSizeImg as System.Drawing.Image
    fullSizeImg = System.Drawing.Image.FromFile(Server.MapPath(imageUrl))
   
    'Set the ContentType to "image/gif" and output the image's data
    Response.ContentType = "image/gif"
    fullSizeImg.Save(Response.OutputStream, ImageFormat.Gif) 
  End Sub
</script>


of this page and this is the image i'm tring to work on, and i get this error!
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2004 at 11:13pm
customErrors mode="Off"

Lead me not into temptation... I know the short cut, follow me.
Back to Top
neotrix View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 November 2003
Location: Pakistan
Status: Offline
Points: 433
Post Options Post Options   Thanks (0) Thanks(0)   Quote neotrix Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2004 at 11:18am
do u think the code is ok ?!?  
Back to Top
neotrix View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 November 2003
Location: Pakistan
Status: Offline
Points: 433
Post Options Post Options   Thanks (0) Thanks(0)   Quote neotrix Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2004 at 11:29am
Originally posted by michael michael wrote:


I have some code that does exactly that, let me know if you want to see...


Please?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.