Bitmap as a Image web control

Discussion in 'ASP .Net Web Controls' started by Beb, Jun 26, 2006.

  1. Beb

    Beb Guest

    Hi Ya,

    quick question for you. Im a little new to web controls and im trying
    to have a control that returns a bitmap image.

    So i have created a web control library, added a control,

    have the following

    public class MyImage : System.Web.UI.WebControls.Image
    {
    Public Bitmap MyBitmap()
    {
    bitmap = new Bitmap(
    300,
    60,
    PixelFormat.Format32bppArgb);
    //........
    // do some stuff
    return bitmap
    }


    }


    so how can i make it that the image control has the results from the
    MyBitmap method?

    or am i doing this totally wrong?
     
    Beb, Jun 26, 2006
    #1
    1. Advertising

  2. The image control can only contain a URL. The URL does not have to be to an
    image file, however. You can give it the URL to a special page that outputs
    the result of your bitmap function.

    Here's more info and a detailed example:
    http://SteveOrr.net/articles/ImproveYourImages.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net



    "Beb" <> wrote in message
    news:...
    > Hi Ya,
    >
    > quick question for you. Im a little new to web controls and im trying
    > to have a control that returns a bitmap image.
    >
    > So i have created a web control library, added a control,
    >
    > have the following
    >
    > public class MyImage : System.Web.UI.WebControls.Image
    > {
    > Public Bitmap MyBitmap()
    > {
    > bitmap = new Bitmap(
    > 300,
    > 60,
    > PixelFormat.Format32bppArgb);
    > //........
    > // do some stuff
    > return bitmap
    > }
    >
    >
    > }
    >
    >
    > so how can i make it that the image control has the results from the
    > MyBitmap method?
    >
    > or am i doing this totally wrong?
    >
     
    Steve C. Orr [MVP, MCSD], Jun 27, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben

    Bitmap as a Image web control

    Ben, Jun 26, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    593
    bruce barker \(sqlwork.com\)
    Jun 26, 2006
  2. Gandalf

    Masked bitmap from bitmap

    Gandalf, Jan 29, 2004, in forum: Python
    Replies:
    0
    Views:
    601
    Gandalf
    Jan 29, 2004
  3. xqggz
    Replies:
    1
    Views:
    437
    Victor Bazarov
    Jun 19, 2007
  4. MikeB

    Set Image Control to Bitmap

    MikeB, Aug 13, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    454
    MikeB
    Aug 15, 2007
  5. Support
    Replies:
    1
    Views:
    468
    Steve C. Orr [MVP, MCSD]
    Jun 3, 2005
Loading...

Share This Page