|
Post by tsh73 on Apr 2, 2022 3:18:55 GMT
Tiles are 100*100 pixels 24 bit bmp 30054 bytes I just saved from paint as bmp and got this format. Program uses only one tile, just historically there were 3: diadonal 4 color, sunflower adapted to QBcolors and full-color one.
Probably running with ctrl f5 (light debug) could show offending line on error.
|
|
|
Post by plus on Apr 2, 2022 11:55:55 GMT
This is what I get for tile2.bmp Ctrl+F5
|
|
|
Post by tsh73 on Apr 2, 2022 13:04:56 GMT
B+, Tile you got from site is in PNG format. You likely saved it as *.BMP, but it is still PNG inside.
EDIT: I just checked 3 different image posting sites. All of them converted BMP to PNG!!! :((
So sub reading width height returns bogus values (I got exactly this too) Then it tries dimension huge array and dies.
Open this file in Paint and SaveAs - select format "24 bit bitmap". Jus did it - worked for me (Win 10 home 32 bit)
|
|
|
Post by plus on Apr 2, 2022 14:05:48 GMT
B+, Tile you got from site is in PNG format. You likely saved it as *.BMP, but it is still PNG inside.
EDIT: I just checked 3 different image posting sites. All of them converted BMP to PNG!!! (
So sub reading width height returns bogus values (I got exactly this too) Then it tries dimension huge array and dies. Open this file in Paint and SaveAs - select format "24 bit bitmap". Jus did it - worked for me (Win 10 home 32 bit) Yes, that did the trick! Both code versions and all data blocks are working as expected. Guess I had right idea just picked the wrong bit format for BMP (now I see you did say 24 bit BMP with Ctrl + F5 suggestion, sorry I missed that). Like I said at LB, this is really impressive, beyond what I thought JB capable (then I was just going by screen shots, now I know it works in JB for sure). @carl might consider this as advanced demo for JB.
|
|
|
Post by tsh73 on Apr 2, 2022 14:26:21 GMT
will just add error checking in program posted Saying
Not a valid BMP file, check first 10 bytes: .PNG......
Program needs 100x100 BMP file 24 bit per pixel Open your picture in Paint and Save As 24 bit BMP file
-=* press Enter to quit *=-
*done*
|
|