Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I need help related to bitmaps...

I have decalred a bitmap in which i drew some shapes, I want to save it as a Gif image

The thing is I want to have other things in the file such as labels or other bitmaps, but

I can't figure out how to do that... Can anyone give me an example on how to do that?

 

This is the code I use for the bitmap:

 

dim objBitmap as new Bitmap(400,300)

dim objGraphics as graphics

 

objGraphics = graphics.fromImage(objbitmap)

objGraphics.Clear(blue)

objGraphics.Save(response.OutputStream,imageFormat.gif)

  • *Experts*
Posted

If by labels you mean you want to draw text and not draw a Label control, you can use the methods of the Graphics object you created. Look at it's methods such as DrawText and DrawImage.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

I'm afraid i haven't made myself clear, I already use the methods to write strings in the bitmap... but i want is to add other form elements other than the bitmap e.g button,textbox,...

 

I can't seem to be able to do that, the bitmap simply overwites that.... someone said use a picturebox , but I'm not sure I know how to do that....Can you show me?

 

thanx in advance

Posted

You want to save the appearance of the label control on your form within the gif image?

 

You can problably find some way to "Capture" a image of the screen and then pull the image of the label and then draw it onto your form.

When in doubt.... use the sledge Hammer!!
Posted

what i want is to use a container for the image so that i can add other form elements ... i can't do that since I write the image tio the output stream.... Is a picture Box a solution?

if it is can you tell me how to declare and use one?

Posted
You cant save the position of the controls within the container to a image file. You can save the image file and then add the positions of the controls within the picture box to the end of the image file, but you will not be able to open the image file in other image viewers. Go on PSCODE.COM and search for "binary file" or "setup" to learn how to add files to the end of other files.
When in doubt.... use the sledge Hammer!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...