![]() |
![]() |
#1 |
DarkN3mo
Join Date: Jan 2021
Location: FRANCE
Posts: 45
|
bmp decoder on amospro
[SOLVED] I'm looking to make a bmp decoder on amospro. I'm looking at the structures of the bmp file, but I can't find the right information to read all the data where it is needed.
Last edited by DiabloV; 22 July 2023 at 08:23. |
![]() |
![]() |
#2 |
Registered User
Join Date: Nov 2004
Location: Germany
Posts: 629
|
Here is a source code of a bitmap reader in QBasic (pc/dos) http://petesqbsite.com/sections/tuto...ding_bmps.html
|
![]() |
![]() |
#3 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,298
|
Be aware that BMP files are little endian, and the image is usually stored upside down. Assuming you want to read an 8-bit BMP for most of them you can just read the width/height pair as 32-bit little endian longs starting from offset 18 ($12, so height at $16). Palette is at offset 54 ($36) and stored as 256 32-bit little endian longs as xxRRGGBB (i.e. bytes are BB GG RR xx). The image data follows that, but upside down from nearly every other image format. True color (24/32-bit) BMPs don't have a palette, but here the pixels are also stored BGR.
The format allows for a lot of flexibility, but the above is enough as long as you only need to support files you create yourself. I haven't programmed in amos, so I can't write the function for you, but if you have some code that doesn't work I can probably spot any errors (as long as they relate to the format) ![]() |
![]() |
![]() |
#4 |
DarkN3mo
Join Date: Jan 2021
Location: FRANCE
Posts: 45
|
hello. I have SOLVED This. i have self-made my routine decoder
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SPS Decoder Library 5.1 (formerly IPF Decoder Lib) Windows binary + source released | mr.vince | News | 29 | 08 February 2021 03:46 |
Best way to convert BMP/PNG/JPG to IFF? | 8bitbubsy | support.Apps | 26 | 20 February 2017 22:33 |
AMOSPro Source | Retro1234 | Coders. AMOS | 4 | 09 December 2012 02:28 |
How To Get JPEG Or BMP Into DPaintIV | Morbane | support.Amiga Forever | 7 | 26 November 2011 12:09 |
AMOSpro install A4000 | frl9lk | support.Apps | 1 | 28 October 2008 15:48 |
|
|