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 / Loading image and getting width, height details?

Author
Message
padlock
21
Years of Service
User Offline
Joined: 16th Sep 2002
Location:
Posted: 2nd Oct 2002 11:12
I'm trying to create a CreateMatrixFromImage() function where one loads an image and then gets height and width details which are used to loop through each pixel and set matrix heights etc .... but there's no image width, height commands. There is for sprite but not image?

I need to test these params to set loop limits otherwise function crashes if image is too small.

Maybe i'm doing this wrong?

DBPro is giving me a whole lot of frustration and not much progress.
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 2nd Oct 2002 15:31
Load it as a bitmap instead of an image and then you have access to the bitmap width and height commands. Failing that you could make a sprite out of your image for the sole purpose of obtaining its height and width and then delete it - although to be honest that's quite a sloppy idea.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming

Login to post a reply

Server time is: 2024-05-07 00:29:17
Your offset time is: 2024-05-07 00:29:17