Ask a Question related to ASP.NET General, Design and Development.
-
Robert #1
Add a Bitmap ???
I need to add a dynamical!! generated bitmap to an image
button! What is the way to do it? The ImageButton offers
only the URL property. But this are physical file paths.
Dim new_bitmap As Bitmap = New Bitmap(850, 200)
Dim image_button As New System.Web.UI.WebControls.ImageButton
Thanks a lot
Rob
Robert Guest
-
how to edit bitmap which is imported in flash using xmland save the edited bitmap back to xml in flash.
hi all It would be appreciated if any one let me know how to edit bitmap which is imported in flash using xml and save the edited bitmap back to... -
How to cut out bitmap ???
Show me the way to cut out bitmap ,please ??? Thanks -
Break Apart Bitmap
Hi all I have a bitmap imported into Flash MX. There are several ares of this image I would like to use for "buttons". Am I right in saying that... -
Bitmap to vectors?
Actually, FreeHand's trace tool is pretty good, in my opinion. Colors and shapes are reproduced very well. BUT... if you want to be able to edit... -
undo bitmap?
Hi, is there any way to "undo" an image after I flattened/saved it to bitmap? (undo CNTL + Z not an option - too late for that) Thanks. John -
Daniel Bass #2
Re: Add a Bitmap ???
The problem you have is that your working in the server side's memory... and
so the image you're creating and using is, the server's buffer. When the
request from the client to the server is made to pass it a picture, it needs
to be a file that's requested, or the server won't know how to send it, and
the client won't know how to receive it and show it.
The only way you can do this is to first stream out the buffer, (i.e, save
the bitmap to disk), then take that URL you've just saved the file too and
pass that to the image button's URL.
I'd suggest using something like in the ASP page...
<A HREF="somefolder/somefile"><IMG BORDER=no ID=myImage
SRC="images/myTempPick.jpg"></A>
then when you've gotten the bitmap and saved it, something like... (aspx.vb
file)
dim ClientScript as String = ""
ClientScript += "<SCRIPT language=javascript>" & vbNewLine
ClientScript += " document.all.myImage.src = " & stringImageURL &
vbNewLine ' where stringImageURL is a string containing your image
location you've saved out
ClientScript += "</SCRIPT>
RegisterStartupScript( "ImageChange", ClientScript )
This code then writes the client side script to change your image URL from
the TempPick to whatever pic you now want. Note that I used HTML's standard
<IMG> rather than the <ASP:...>, I haven't played much with the ASP.net
controls in this way so am not sure what they'll do, try it!
hope that helps, and works!
Dan.
"Robert" <robert_dx@gmx.com> wrote in message
news:09d901c3452c$32d281c0$a501280a@phx.gbl...> I need to add a dynamical!! generated bitmap to an image
> button! What is the way to do it? The ImageButton offers
> only the URL property. But this are physical file paths.
>
> Dim new_bitmap As Bitmap = New Bitmap(850, 200)
>
> Dim image_button As New System.Web.UI.WebControls.ImageButton
>
> Thanks a lot
>
> Rob
Daniel Bass Guest
-
Kevin Spencer #3
Re: Add a Bitmap ???
You don't want a Bitmap. You want an image format that IS supported by
browsers, such as JPG or GIF. What you need to do is to create an ASPX page
that uses Response.BinaryWrite() to write the binary image to the Response.
This ASPX page must also set the ContentType to "image/jpg" or "image/gif"
to inform the browser that it is not an ASPX page that is being returned,
but an image. Your image button can then use the URL of the ASPX page as the
URL to the image.
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Some things just happen.
Everything else occurs.
"Robert" <robert_dx@gmx.com> wrote in message
news:09d901c3452c$32d281c0$a501280a@phx.gbl...> I need to add a dynamical!! generated bitmap to an image
> button! What is the way to do it? The ImageButton offers
> only the URL property. But this are physical file paths.
>
> Dim new_bitmap As Bitmap = New Bitmap(850, 200)
>
> Dim image_button As New System.Web.UI.WebControls.ImageButton
>
> Thanks a lot
>
> Rob
Kevin Spencer Guest
-
Kenn Ghannon #4
Re: Add a Bitmap ???
The May/June 2003 issue of CoDe (component developer magazine) had some
great articles on doing things of this nature. Basically, you need to use
the System.Drawing and System.Drawing.Imaging libraries. Use the source of
your image as an aspx page with a Response.ContentType = "image/jpeg" or
"image/gif" etc. I use something like this in a few of my pages <img
src="paint.aspx"> to create some dynamic images.
I don't want to violate copyright laws by repeating the source code that's
in there,
"Robert" <robert_dx@gmx.com> wrote in message
news:09d901c3452c$32d281c0$a501280a@phx.gbl...> I need to add a dynamical!! generated bitmap to an image
> button! What is the way to do it? The ImageButton offers
> only the URL property. But this are physical file paths.
>
> Dim new_bitmap As Bitmap = New Bitmap(850, 200)
>
> Dim image_button As New System.Web.UI.WebControls.ImageButton
>
> Thanks a lot
>
> Rob
Kenn Ghannon Guest



Reply With Quote

