PDA

Click to See Complete Forum and Search --> : I need help saving bitmaps


Timbermar
Oct 18th, 2000, 10:57 PM
Ok, heres the deal, I want to make a tile-based game. as I sat down to draw each tile, pixel by pixel, I realized I could make a program in VB to make these tiles for me, since most of them use the same basic designs in each tile. so I started working on my new project(it was a lot better than hand drawing tiles), and I have all the functions I need implemented in it, so I went to code the save routine. no matter what I tried, I either got an error, or it saved a blank bitmap, and it is truely frustrating me. if anybody could help, please email me, or respond to this post so others can learn how to do this too, thanks in advance.

/\/\isanThr0p
Oct 18th, 2000, 11:23 PM
Hm saving really is not a big deal!
if the picture is a picturebox just use
savepicture picbox.image, filename (perhaps firrst filename whatever!)

Btw I'm really interested in your tile prog!

If it doesn't worke, just send me some descriptions of the picbox.

Timbermar
Oct 19th, 2000, 10:15 AM
I'll have to give that a try, I'm not sitting at the right computer at this time, but I'll explain my problem better this time. I've tried using that command to save the bitmap, and all it does is save a blank bitmap, if I start with a bitmap loaded in picbox, and edit it, when I save, it saves the orginal bitmap, it won't save my edits to the file. the way I went about doing it was like this, I will try using picbox.image in my savepicture command, and see what happens. I was trying to use picbox.picture, thanks again. I have another small slight question, involving colors. in paint brush, hues and saturation and all that are mixed with the color, so when I match the RGB value in VB, my color is a lighter shade. is there anyway I can match the colors I used in paint brush? If there isn't, I can always redraw the tiles I've done so far, its only about 40.(for some reason, I never take on easy projects). Well, I'm sure everybody doesn't care anymore :), but thanks again. I'll let everybody know if the suggestion from Misan worked, thanks one more time.

Timbermar
Oct 19th, 2000, 10:51 AM
I tried using picbox.image in the savepicture command, and I still got the same results, maybe there is some sort of API call I need to make first, I had heard of a CreateCompatableBitmap function, but I don't have the apiviewer installed on my computer, so I can't figure out how to use the call. and I've looked all over the web, even on microsoft's pages, and I'm still clueless about it. oh well, I'm hoping u guys can fix me up :). BTW are u interested in my game, or my program to make tiles?

/\/\isanThr0p
Oct 19th, 2000, 05:28 PM
Hm So you want to get a pixel, of your picture, and replace it, right?
If it is like this, just use the getPixel and Setpixel API's.
If there are more questions about it the best would be an Email.

Timbermar
Oct 23rd, 2000, 05:18 PM
Alright, I need to know how to load palettes. I've stomped down all other paths, and I think this is the only way I'll be able to match my colors. my problem is that paintbrush uses hue and saturation in colors. I can match the RGB in visual basic, but I its not the same color. so I'm pretty sure if I can load a palette from paint brush then I'll have the color I need, and I can stop bothering everybody, well, prolly not, I'm still trying to figure out masking and stuff(I have no clue when it comes to graphics, and I don't have the API viewer). well, I think I'll worry about color matching before I move onto masking. thanks