Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,213 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: now I have problem with pixel_to_bmap() [Re: Locoweed] #348992
12/02/10 17:48
12/02/10 17:48
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
Thank you,

I would *still* like to know why pixel_to_bmap() wont write pixels to a 24-bit bmap, though. I can work around it using 32-bit bmaps, but its still annoying to not know the why of the problem.

Re: now I have problem with pixel_to_bmap() [Re: Caermundh] #349003
12/02/10 22:01
12/02/10 22:01
Joined: Apr 2010
Posts: 172
W
wdlmaster Offline
Member
wdlmaster  Offline
Member
W

Joined: Apr 2010
Posts: 172
Because in your code you used 8888 as format. But 24bit needs to be 888.

Re: now I have problem with pixel_to_bmap() [Re: Caermundh] #349032
12/03/10 11:07
12/03/10 11:07
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Caermundh
(@wdlmaster & @MrGuest: Both of your routines worked perfectly - *until* I tried using them on a 24 bit bmap. once i converted to 24 bit, both routines displayed the same problem - not writing pixels to the bitmap.)
How exactly did you test this,

changing bmap_createblack()to 24 bit for pnlFrom.bmap
changing bmap_createblack()to 24 bit for pnlTo.bmap
changing bmap_createblack()to 24 bit for pnlFrom.bmap and pnlTo.bmap

all work...?

Re: now I have problem with pixel_to_bmap() [Re: MrGuest] #349066
12/03/10 18:32
12/03/10 18:32
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
I tested using 8888 and 24 bit bmaps, then 8888 and 32 bit bmaps. After that, i tried 888 and 24 & 32 bit bmaps. the only time anything worked was when i used 8888 and my bmaps were 32 bit.

I actually ended up dropping the bmap_createblack() call and using 2 bmaps instead. (BMAP* bmp1 and BMAP* bmp2). As stated, wdlmasters code worked perfectly once I saved the bmaps as 32 bit in Photoshop - pixel_to_bmap() also worked fine as well.

Once I saved the bitmaps in photoshop as 24 bit( as well as changing the code to use 888 format), pixel_to_bmap() simply wouldnt write pixels to the bitmap - as well as wdlmasters code.

Curiously, the format returned by bmap_lock was 8888 - period. Whether I was locking a 24 bit bmap or a 32 bit bmap - it returned 8888 like it thought it was dealing with 32-bit. At the time, I didnt pay any attention because the manual had stated that formats are automatically "upconverted" depending on the video card. Maybe bmap_lock() is the culprit?

Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1