Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornComputing_199402.adf » 9402 » Miscellany/To_FromBMP/!ToBMP/!Help
Miscellany/To_FromBMP/!ToBMP/!Help
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
| Tape/disk: | Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornComputing_199402.adf » 9402 |
| Filename: | Miscellany/To_FromBMP/!ToBMP/!Help |
| Read OK: | ✔ |
| File size: | 09F2 bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Acorn Computing » 1994 02.adf » 9402 » Miscellany/To_FromBMP/!ToBMP/!Help
- Recent acquisitions » Acorn ADFS disks » adfs_AcornComputing_199402.adf » 9402 » Miscellany/To_FromBMP/!ToBMP/!Help
File contents
_____________________________________________________________________________
ToBMP
version 1.01 (11 Oct 1993)
written by David Thomas
for Acorn Computing � 1993
_____________________________________________________________________________
Purpose ___________________________________________________________________
BMP is the format mainly used for graphical interchange in the Microsoft
Windows environment for PC-compatible machines. Since many RISC OS users
also use PCs on a regular basis, it's handy to be able to convert between
the native formats on RISC OS (Sprite and Clear) and BMP.
The ToBMP application will convert Sprites and certain types of Clear files
(8 and 24bpp) to the BMP format. The resulting file can then be placed on a
DOS format disc and used on a PC running Windows and associated applications
(or, in fact, any DOS program that reads BMPs). The files made by this
application have been tested on several PC applications and have proved
successful.
This application is complemented by the FromBMP convertor. Which provides
conversion from BMP to Sprite and Clear (hence the name).
Usage _____________________________________________________________________
When you want to convert a file, firstly ensure it is in either Sprite or
Clear format and then drag it to the ToBMP icon on the icon bar. Once you
have done this a save box will appear, you use this in the standard RISC OS
way. After you have saved the file, you can then transfer the file to a PC
and do whatever you want with it.
BMPs only support 1, 4, 8 or 24 bits-per-pixel (bpp) files and so the input
files accepted are Sprites of 1, 4 and 8bpp (RISC OS 3's 256-entry Sprites
will work) and Clear files of 8 and 24bpp.
When creating a file from a Sprite, a palette is checked for, if one is
found then it is used, however if ToBMP doesn't find one it uses the default
desktop palette for that mode. This doesn't apply to Clear files as they
always have palettes.
Please note that Translator and ChangeFSI have problems when reading
certain BMPs, as they incorrectly calculate the line-lengths. (You can use
FromBMP instead anyway).
Credits ___________________________________________________________________
Thanx to John O'Rourke for letting me test my BMPs on his '486. An A3000
running a dodgy copy of Graphics Workshop, on the PC Emulator, from floppy,
in VGA, isn't exactly a speedy testing method!
00000000 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f |________________| * 00000040 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 0a 0a 20 |_____________.. | 00000050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000070 20 20 20 54 6f 42 4d 50 0a 0a 20 20 20 20 20 20 | ToBMP.. | 00000080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000090 20 20 20 20 76 65 72 73 69 6f 6e 20 31 2e 30 31 | version 1.01| 000000a0 20 28 31 31 20 4f 63 74 20 31 39 39 33 29 0a 0a | (11 Oct 1993)..| 000000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000c0 20 20 20 20 20 20 20 20 20 20 20 77 72 69 74 74 | writt| 000000d0 65 6e 20 62 79 20 44 61 76 69 64 20 54 68 6f 6d |en by David Thom| 000000e0 61 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |as. | 000000f0 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 | for| 00000100 20 41 63 6f 72 6e 20 43 6f 6d 70 75 74 69 6e 67 | Acorn Computing| 00000110 20 a9 20 31 39 39 33 0a 5f 5f 5f 5f 5f 5f 5f 5f | . 1993.________| 00000120 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f |________________| * 00000160 5f 5f 5f 5f 5f 0a 0a 20 50 75 72 70 6f 73 65 20 |_____.. Purpose | 00000170 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f |________________| * 000001b0 5f 5f 5f 0a 0a 20 42 4d 50 20 69 73 20 74 68 65 |___.. BMP is the| 000001c0 20 66 6f 72 6d 61 74 20 6d 61 69 6e 6c 79 20 75 | format mainly u| 000001d0 73 65 64 20 66 6f 72 20 67 72 61 70 68 69 63 61 |sed for graphica| 000001e0 6c 20 69 6e 74 65 72 63 68 61 6e 67 65 20 69 6e |l interchange in| 000001f0 20 74 68 65 20 4d 69 63 72 6f 73 6f 66 74 0a 57 | the Microsoft.W| 00000200 69 6e 64 6f 77 73 20 65 6e 76 69 72 6f 6e 6d 65 |indows environme| 00000210 6e 74 20 66 6f 72 20 50 43 2d 63 6f 6d 70 61 74 |nt for PC-compat| 00000220 69 62 6c 65 20 6d 61 63 68 69 6e 65 73 2e 20 20 |ible machines. | 00000230 53 69 6e 63 65 20 6d 61 6e 79 20 52 49 53 43 20 |Since many RISC | 00000240 4f 53 20 75 73 65 72 73 0a 61 6c 73 6f 20 75 73 |OS users.also us| 00000250 65 20 50 43 73 20 6f 6e 20 61 20 72 65 67 75 6c |e PCs on a regul| 00000260 61 72 20 62 61 73 69 73 2c 20 69 74 27 73 20 68 |ar basis, it's h| 00000270 61 6e 64 79 20 74 6f 20 62 65 20 61 62 6c 65 20 |andy to be able | 00000280 74 6f 20 63 6f 6e 76 65 72 74 20 62 65 74 77 65 |to convert betwe| 00000290 65 6e 0a 74 68 65 20 6e 61 74 69 76 65 20 66 6f |en.the native fo| 000002a0 72 6d 61 74 73 20 6f 6e 20 52 49 53 43 20 4f 53 |rmats on RISC OS| 000002b0 20 28 53 70 72 69 74 65 20 61 6e 64 20 43 6c 65 | (Sprite and Cle| 000002c0 61 72 29 20 61 6e 64 20 42 4d 50 2e 0a 0a 20 54 |ar) and BMP... T| 000002d0 68 65 20 54 6f 42 4d 50 20 61 70 70 6c 69 63 61 |he ToBMP applica| 000002e0 74 69 6f 6e 20 77 69 6c 6c 20 63 6f 6e 76 65 72 |tion will conver| 000002f0 74 20 53 70 72 69 74 65 73 20 61 6e 64 20 63 65 |t Sprites and ce| 00000300 72 74 61 69 6e 20 74 79 70 65 73 20 6f 66 20 43 |rtain types of C| 00000310 6c 65 61 72 20 66 69 6c 65 73 0a 28 38 20 61 6e |lear files.(8 an| 00000320 64 20 32 34 62 70 70 29 20 74 6f 20 74 68 65 20 |d 24bpp) to the | 00000330 42 4d 50 20 66 6f 72 6d 61 74 2e 20 20 54 68 65 |BMP format. The| 00000340 20 72 65 73 75 6c 74 69 6e 67 20 66 69 6c 65 20 | resulting file | 00000350 63 61 6e 20 74 68 65 6e 20 62 65 20 70 6c 61 63 |can then be plac| 00000360 65 64 20 6f 6e 20 61 0a 44 4f 53 20 66 6f 72 6d |ed on a.DOS form| 00000370 61 74 20 64 69 73 63 20 61 6e 64 20 75 73 65 64 |at disc and used| 00000380 20 6f 6e 20 61 20 50 43 20 72 75 6e 6e 69 6e 67 | on a PC running| 00000390 20 57 69 6e 64 6f 77 73 20 61 6e 64 20 61 73 73 | Windows and ass| 000003a0 6f 63 69 61 74 65 64 20 61 70 70 6c 69 63 61 74 |ociated applicat| 000003b0 69 6f 6e 73 0a 28 6f 72 2c 20 69 6e 20 66 61 63 |ions.(or, in fac| 000003c0 74 2c 20 61 6e 79 20 44 4f 53 20 70 72 6f 67 72 |t, any DOS progr| 000003d0 61 6d 20 74 68 61 74 20 72 65 61 64 73 20 42 4d |am that reads BM| 000003e0 50 73 29 2e 20 20 54 68 65 20 66 69 6c 65 73 20 |Ps). The files | 000003f0 6d 61 64 65 20 62 79 20 74 68 69 73 0a 61 70 70 |made by this.app| 00000400 6c 69 63 61 74 69 6f 6e 20 68 61 76 65 20 62 65 |lication have be| 00000410 65 6e 20 74 65 73 74 65 64 20 6f 6e 20 73 65 76 |en tested on sev| 00000420 65 72 61 6c 20 50 43 20 61 70 70 6c 69 63 61 74 |eral PC applicat| 00000430 69 6f 6e 73 20 61 6e 64 20 68 61 76 65 20 70 72 |ions and have pr| 00000440 6f 76 65 64 0a 73 75 63 63 65 73 73 66 75 6c 2e |oved.successful.| 00000450 0a 0a 20 54 68 69 73 20 61 70 70 6c 69 63 61 74 |.. This applicat| 00000460 69 6f 6e 20 69 73 20 63 6f 6d 70 6c 65 6d 65 6e |ion is complemen| 00000470 74 65 64 20 62 79 20 74 68 65 20 46 72 6f 6d 42 |ted by the FromB| 00000480 4d 50 20 63 6f 6e 76 65 72 74 6f 72 2e 20 20 57 |MP convertor. W| 00000490 68 69 63 68 20 70 72 6f 76 69 64 65 73 0a 63 6f |hich provides.co| 000004a0 6e 76 65 72 73 69 6f 6e 20 66 72 6f 6d 20 42 4d |nversion from BM| 000004b0 50 20 74 6f 20 53 70 72 69 74 65 20 61 6e 64 20 |P to Sprite and | 000004c0 43 6c 65 61 72 20 28 68 65 6e 63 65 20 74 68 65 |Clear (hence the| 000004d0 20 6e 61 6d 65 29 2e 0a 0a 20 55 73 61 67 65 20 | name)... Usage | 000004e0 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f |________________| * 00000520 5f 5f 5f 5f 5f 0a 0a 20 57 68 65 6e 20 79 6f 75 |_____.. When you| 00000530 20 77 61 6e 74 20 74 6f 20 63 6f 6e 76 65 72 74 | want to convert| 00000540 20 61 20 66 69 6c 65 2c 20 66 69 72 73 74 6c 79 | a file, firstly| 00000550 20 65 6e 73 75 72 65 20 69 74 20 69 73 20 69 6e | ensure it is in| 00000560 20 65 69 74 68 65 72 20 53 70 72 69 74 65 20 6f | either Sprite o| 00000570 72 0a 43 6c 65 61 72 20 66 6f 72 6d 61 74 20 61 |r.Clear format a| 00000580 6e 64 20 74 68 65 6e 20 64 72 61 67 20 69 74 20 |nd then drag it | 00000590 74 6f 20 74 68 65 20 54 6f 42 4d 50 20 69 63 6f |to the ToBMP ico| 000005a0 6e 20 6f 6e 20 74 68 65 20 69 63 6f 6e 20 62 61 |n on the icon ba| 000005b0 72 2e 20 20 4f 6e 63 65 20 79 6f 75 0a 68 61 76 |r. Once you.hav| 000005c0 65 20 64 6f 6e 65 20 74 68 69 73 20 61 20 73 61 |e done this a sa| 000005d0 76 65 20 62 6f 78 20 77 69 6c 6c 20 61 70 70 65 |ve box will appe| 000005e0 61 72 2c 20 79 6f 75 20 75 73 65 20 74 68 69 73 |ar, you use this| 000005f0 20 69 6e 20 74 68 65 20 73 74 61 6e 64 61 72 64 | in the standard| 00000600 20 52 49 53 43 20 4f 53 0a 77 61 79 2e 20 20 41 | RISC OS.way. A| 00000610 66 74 65 72 20 79 6f 75 20 68 61 76 65 20 73 61 |fter you have sa| 00000620 76 65 64 20 74 68 65 20 66 69 6c 65 2c 20 79 6f |ved the file, yo| 00000630 75 20 63 61 6e 20 74 68 65 6e 20 74 72 61 6e 73 |u can then trans| 00000640 66 65 72 20 74 68 65 20 66 69 6c 65 20 74 6f 20 |fer the file to | 00000650 61 20 50 43 0a 61 6e 64 20 64 6f 20 77 68 61 74 |a PC.and do what| 00000660 65 76 65 72 20 79 6f 75 20 77 61 6e 74 20 77 69 |ever you want wi| 00000670 74 68 20 69 74 2e 0a 0a 20 42 4d 50 73 20 6f 6e |th it... BMPs on| 00000680 6c 79 20 73 75 70 70 6f 72 74 20 31 2c 20 34 2c |ly support 1, 4,| 00000690 20 38 20 6f 72 20 32 34 20 62 69 74 73 2d 70 65 | 8 or 24 bits-pe| 000006a0 72 2d 70 69 78 65 6c 20 28 62 70 70 29 20 66 69 |r-pixel (bpp) fi| 000006b0 6c 65 73 20 61 6e 64 20 73 6f 20 74 68 65 20 69 |les and so the i| 000006c0 6e 70 75 74 0a 66 69 6c 65 73 20 61 63 63 65 70 |nput.files accep| 000006d0 74 65 64 20 61 72 65 20 53 70 72 69 74 65 73 20 |ted are Sprites | 000006e0 6f 66 20 31 2c 20 34 20 61 6e 64 20 38 62 70 70 |of 1, 4 and 8bpp| 000006f0 20 28 52 49 53 43 20 4f 53 20 33 27 73 20 32 35 | (RISC OS 3's 25| 00000700 36 2d 65 6e 74 72 79 20 53 70 72 69 74 65 73 0a |6-entry Sprites.| 00000710 77 69 6c 6c 20 77 6f 72 6b 29 20 61 6e 64 20 43 |will work) and C| 00000720 6c 65 61 72 20 66 69 6c 65 73 20 6f 66 20 38 20 |lear files of 8 | 00000730 61 6e 64 20 32 34 62 70 70 2e 0a 0a 20 57 68 65 |and 24bpp... Whe| 00000740 6e 20 63 72 65 61 74 69 6e 67 20 61 20 66 69 6c |n creating a fil| 00000750 65 20 66 72 6f 6d 20 61 20 53 70 72 69 74 65 2c |e from a Sprite,| 00000760 20 61 20 70 61 6c 65 74 74 65 20 69 73 20 63 68 | a palette is ch| 00000770 65 63 6b 65 64 20 66 6f 72 2c 20 69 66 20 6f 6e |ecked for, if on| 00000780 65 20 69 73 0a 66 6f 75 6e 64 20 74 68 65 6e 20 |e is.found then | 00000790 69 74 20 69 73 20 75 73 65 64 2c 20 68 6f 77 65 |it is used, howe| 000007a0 76 65 72 20 69 66 20 54 6f 42 4d 50 20 64 6f 65 |ver if ToBMP doe| 000007b0 73 6e 27 74 20 66 69 6e 64 20 6f 6e 65 20 69 74 |sn't find one it| 000007c0 20 75 73 65 73 20 74 68 65 20 64 65 66 61 75 6c | uses the defaul| 000007d0 74 0a 64 65 73 6b 74 6f 70 20 70 61 6c 65 74 74 |t.desktop palett| 000007e0 65 20 66 6f 72 20 74 68 61 74 20 6d 6f 64 65 2e |e for that mode.| 000007f0 20 20 54 68 69 73 20 64 6f 65 73 6e 27 74 20 61 | This doesn't a| 00000800 70 70 6c 79 20 74 6f 20 43 6c 65 61 72 20 66 69 |pply to Clear fi| 00000810 6c 65 73 20 61 73 20 74 68 65 79 0a 61 6c 77 61 |les as they.alwa| 00000820 79 73 20 68 61 76 65 20 70 61 6c 65 74 74 65 73 |ys have palettes| 00000830 2e 0a 0a 20 50 6c 65 61 73 65 20 6e 6f 74 65 20 |... Please note | 00000840 74 68 61 74 20 54 72 61 6e 73 6c 61 74 6f 72 20 |that Translator | 00000850 61 6e 64 20 43 68 61 6e 67 65 46 53 49 20 68 61 |and ChangeFSI ha| 00000860 76 65 20 70 72 6f 62 6c 65 6d 73 20 77 68 65 6e |ve problems when| 00000870 20 72 65 61 64 69 6e 67 0a 63 65 72 74 61 69 6e | reading.certain| 00000880 20 42 4d 50 73 2c 20 61 73 20 74 68 65 79 20 69 | BMPs, as they i| 00000890 6e 63 6f 72 72 65 63 74 6c 79 20 63 61 6c 63 75 |ncorrectly calcu| 000008a0 6c 61 74 65 20 74 68 65 20 6c 69 6e 65 2d 6c 65 |late the line-le| 000008b0 6e 67 74 68 73 2e 20 20 28 59 6f 75 20 63 61 6e |ngths. (You can| 000008c0 20 75 73 65 0a 46 72 6f 6d 42 4d 50 20 69 6e 73 | use.FromBMP ins| 000008d0 74 65 61 64 20 61 6e 79 77 61 79 29 2e 0a 0a 20 |tead anyway)... | 000008e0 43 72 65 64 69 74 73 20 5f 5f 5f 5f 5f 5f 5f 5f |Credits ________| 000008f0 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f |________________| * 00000920 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 0a 0a 20 54 68 |___________.. Th| 00000930 61 6e 78 20 74 6f 20 4a 6f 68 6e 20 4f 27 52 6f |anx to John O'Ro| 00000940 75 72 6b 65 20 66 6f 72 20 6c 65 74 74 69 6e 67 |urke for letting| 00000950 20 6d 65 20 74 65 73 74 20 6d 79 20 42 4d 50 73 | me test my BMPs| 00000960 20 6f 6e 20 68 69 73 20 27 34 38 36 2e 20 41 6e | on his '486. An| 00000970 20 41 33 30 30 30 0a 72 75 6e 6e 69 6e 67 20 61 | A3000.running a| 00000980 20 64 6f 64 67 79 20 63 6f 70 79 20 6f 66 20 47 | dodgy copy of G| 00000990 72 61 70 68 69 63 73 20 57 6f 72 6b 73 68 6f 70 |raphics Workshop| 000009a0 2c 20 6f 6e 20 74 68 65 20 50 43 20 45 6d 75 6c |, on the PC Emul| 000009b0 61 74 6f 72 2c 20 66 72 6f 6d 20 66 6c 6f 70 70 |ator, from flopp| 000009c0 79 2c 0a 69 6e 20 56 47 41 2c 20 69 73 6e 27 74 |y,.in VGA, isn't| 000009d0 20 65 78 61 63 74 6c 79 20 61 20 73 70 65 65 64 | exactly a speed| 000009e0 79 20 74 65 73 74 69 6e 67 20 6d 65 74 68 6f 64 |y testing method| 000009f0 21 0a |!.| 000009f2
.