English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 12 January 2023, 06:01   #1
DiabloV
Registered User
 
Join Date: Jan 2021
Location: FRANCE
Posts: 30
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.
DiabloV is offline  
Old 12 January 2023, 16:01   #2
Dan
Registered User
 
Dan's Avatar
 
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
Dan is offline  
Old 12 January 2023, 18:07   #3
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
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)
paraj is offline  
Old 22 July 2023, 08:23   #4
DiabloV
Registered User
 
Join Date: Jan 2021
Location: FRANCE
Posts: 30
hello. I have SOLVED This. i have self-made my routine decoder
DiabloV is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:39.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08641 seconds with 15 queries