Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Problem when loading images

Author
Message
SeVeN
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 23rd Sep 2003 19:09
Hello to all of you. I depend on you to help me with a little problem I have:

I have created a very simple file format to store values from 0 to 255 in a bidimensional matrix (256x256 is the size i'm using). The target of this format I've created is to grab in the matrix some kind of alpha layer that you can apply to a couple of images to combine them and blend properly, so a value of 255 in the matrix means that a pixel in those coordinates is texture B's pixel, and a value of 128, 200, 80, or any other middle value means that texture A's pixel will be blended with the color of texture B's pixel.

With this format (AMF) I have created a conversor that transforms any 32bit TGA image to its AMF equivalent (which is much smaller and loads faster).

This may seem to be a very simple program. In fact, it is, but this
program is necessary for me, because without this I cannot combine two adjacent cell textures in a single cell (I'm making a RTS game, now programming terrain module).

But now, I have a problem. The conversion utility checks every TGA file it finds in the current directory, and it does this good, but when it tryes to load the image and convert it to memblock, an error messagebox appears saying that the program cant load the image at line 49.

What I am doing wrong? What must I correct? Or it is a DBPro bug?

Any help will be very much appreciated. And sorry any mistake you found in this post or in the code. The original code is written in spanish and I had to translate it. And sorry for this laaaaarge explanation...

Login to post a reply

Server time is: 2026-07-25 07:01:38
Your offset time is: 2026-07-25 07:01:38