PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Trouble creating/importing bitmaps

Harimwakairi · 19 Mar 2002, 18:35 UTC
Anyone else have trouble getting bitmaps into an eVC++ GAPITools project? I'm trying to get new bitmap resources into my project and it's not working.

The bitmaps look fine in the resource editor, but when I run the program, they're either black, or completely screwed up color-wise. The pattern can sometimes still be seen, making me think it's a palette issue of some type.

This happens no matter how I get the file into the project, whether by creating it fresh in the reource editor, using the import resource command in eVC++, or by cutting and pasting bitmap data from Photoshop.

Has anyone else seen this problem? How have you dealt with it?
Jon Wiesman · 20 Mar 2002, 21:40 UTC — Possible solution
I had a similar problem and it turned out that I was creating 16-color bitmaps (the default) in eVC++. Make sure you select 256 color or 65,535 color bitmaps. I'm not sure if that was the problem you are having or not.
Harimwakairi · 29 May 2002, 20:49 UTC — No, that's not it
I checked, and the offending bitmaps are all at 256 colors. 65k wasn't an option for me.

I'm really at wit's end here. Am I the only one left having this trouble?
I'm having similar problems using GapiTools and bitmaps in evc++. I got bitmapped fonts to work OK, but using a bitmap resource by ID (LoadResource, then BitBlt(resourceID,...,TRUE) fails to put the bitmap on the screen.

I tried a few things on my bitmap:
- Make my bitmap 8-bit color
- Force it to be RLE-encoded
- Force it to be 72 DPI
(using ImageMagick convert program:
convert -units PixelsPerInch -density 72x72 orig.bmp new.bmp)

I used these BMP options because that is what the GapiTools demo (swirling logos over plant background) used.

Mystified...
I will look into this right now...

/Johan
When I used RLE encoded bitmaps I got pixel dust (off color pixels) all around my images. When I converted all of my images over to 24bit non-rle bitmaps the pixel dust went away, but now my resources are HUGE. I'm hoping 1.02 will come out soon and support PNG. Then I will convert everything over and won't care.
Harimwakairi · 07 Jun 2002, 05:34 UTC — Thanks...
I appreciate you taking a look at the problem, Johan. I love the toolset, and if I can get this problem resolved I should have my game engine done fairly quickly.

I used to have a workaround that involved importing the plant bitmap used in the demo and then drawing over it in eVC++, or maybe editing it in photoshop first, something like that. But I took a two week break from coding and couldn't remember what I had been doing that was working.

Should've taken notes. That'll teach me.
GapiDraw 1.02 now supports BMP, JPG, GIF and PNG on all platforms (from resource, mem address or file). The source is now feature locked and 1.02 is currently in beta testing.

Update: All previous BMP issues should be resolved as well...

/Johan