On this page
On an Amiga a picture format only really exists once there is a datatype for it: a small module that teaches datatypes.library to read that kind of file. From then on MultiView, the Workbench, image viewers and any program that asks the system for a picture open it without knowing anything about the format. That is why I wrote webp.datatype: Amigram, my Telegram client, shows stickers that arrive as 512 x 512 WEBP pictures with transparency, and AmigaOS 3, AmigaOS 4.1 and MorphOS needed a reliable datatype and an easy way to install it. Version 45.2 came out on 17 November and is on GitHub and Aminet.




What it reads and what it does not
The datatype reads lossy (VP8) and lossless (VP8L) WEBP pictures, pictures with transparency in both forms, and the first frame of an animation, placed on the animation’s canvas. It does not write WEBP files and it does not play animations. Decoding is done by libwebp 1.6.0, the reference library of the WebM project, built as plain C with no changes; the datatype around it is new code. The three libraries are built without a C library and without startup code: the few C functions the decoder needs sit on top of exec.library.
There are three archives: AmigaOS 3.0 to 3.2 on a 68020 or better, AmigaOS 4.1, and MorphOS 3. AROS is left out on purpose, because it already ships a WEBP datatype of its own on i386, x86_64 and ARM, and there is no point replacing a system file with this one. On a 68000 the library refuses to open, so WEBP files are simply not recognised as pictures.
Not the only WEBP datatype
Aminet has other WEBP datatypes, and that is worth saying: WarpWebPdt by Oliver Roberts (45.5, January 2024, for 68k, AmigaOS 4, WarpUP and MorphOS), webp_dt by Chris Young for AmigaOS 4 (2012) and WebPDatatype by krb for the 68020 (October 2026). They all use the same file name, so only one can be installed at a time. Mine is under the GPL 3 or later, uses libwebp 1.6.0 untouched and comes with a public test record: what was tried, on which system, and what was not.
What changes in 45.2
The decoder is the one from 45.1 and the pictures come out identical. What is new is the Install script, which a program can now run with nobody at the machine, as Easy2Install does: the MorphOS package manager unpacks the archive to the RAM disk and starts the script itself. The 45.1 script was written for a person in a Shell: it wanted to be started from its own drawer and asked before replacing any webp.datatype, even an older version of itself.
- Started from another directory, it finds its files in
RAM:webp.datatype, where Easy2Install unpacks them. - It replaces 45.1, or another copy of 45.2, without a question. It only asks before replacing a different WEBP datatype, and shows that datatype’s version first.
- After copying, it reads back the version of the library now in the system and says so when the copy failed, for example on a write-protected file.
- The version string now carries the author’s name after the date. That is how the script tells this datatype from another one with the same file name.
Two details explain the script’s shape. The Version command prints the date in the system language’s format, so searching for text with a date in it was fragile. And the MorphOS Copy returns 0 even when it could not write, which is why the script checks the installed version instead of trusting the exit code.
How it was checked
The yardstick never changes: libwebp’s dwebp decodes a file on the build machine, the datatype decodes the same file on the Amiga, and the pixels must be the same bytes. The dtprobe tool, included in the archives, opens a picture through datatypes.library as any program would and prints a checksum of the pixels it reads back, to compare with the table in the repository.
According to the test record, the new Install was run in emulators on AmigaOS 3.2.3, Kickstart 3.1 with Workbench 3.1, AmigaOS 4.1 Final Edition Update 3 and MorphOS 3.21, covering a system with no WEBP datatype, 45.1 and 45.2 already installed, another datatype under the same name, a file with no version, a protected file and a start from the wrong directory. On a real Power Mac G5 with MorphOS 3.20, where Easy2Install had installed 45.1, the script put 45.2 in its place without a question. After installation dtprobe gave the same seven checksums as with 45.1 on the three emulated AmigaOS systems and on the G5.
Still outside the record, and it says so: AmigaOS 4 on real hardware, AmigaOS 3.5, 3.9 and 3.1.4, Easy2Install starting this script by itself, running out of memory mid-decode, and pictures larger than 512 x 512.
What each system gets
A datatype hands its pixels to the system’s picture.datatype, and what that one accepts differs between versions. AmigaOS 4.1, MorphOS and AmigaOS 3.2 with picture.datatype 47.9 or later get true colour with the alpha channel. Versions V43 to 47.8 (AmigaOS 3.5, 3.9, 3.1.4, early 3.2 and graphics card systems) get true colour, with transparency laid on a white background. Plain AmigaOS 3.0 and 3.1 only take planar pictures with a palette: the datatype picks the best 256 colours with median cut and dithers with Floyd-Steinberg.
A real case shows why this matters: on an A1200 with a PiStorm running AfA OS, the picture.datatype in memory is 46.9, which answers a request for RGBA pixels with success and writes nothing. The first Amigram build drew stickers there as vertical stripes. The README now tells programs that read pixels back to ask for the whole picture as ARGB in one request, as dtprobe does.
MorphOS, and speed on a 68020
MorphOS 3.20 and 3.21 already read WEBP files by themselves through Reggae, with the webp.demuxer and webp.decoder classes: MultiView opens a WEBP even without a datatype. What is missing is a WEBP datatype, so a program that asks datatypes.library for a picture gets nothing. On MorphOS this datatype is for those programs, not for MultiView.
On a 68020 decoding is not quick: it is the reference decoder in plain C, with no assembly. On a stock A1200 emulated cycle exact, a 512 x 512 lossy sticker with transparency opens in 17 seconds, a lossless one in about 9, and a 320 x 240 lossy picture in under 5. On a real A1200 with a 68080 accelerator the same lossy sticker took 0.92 seconds.
Download and installation
The archives are on the 45.2 release page on GitHub and on Aminet: AmigaOS 3.x, AmigaOS 4.1 and MorphOS. Unpack the archive, open a Shell in the webpdt drawer and type Execute Install; over 45.1 it asks nothing. Or copy webp.datatype to SYS:Classes/DataTypes/ and the WebP descriptor to DEVS:DataTypes/, then restart or type AddDataTypes REFRESH. The descriptor recognises files by their first twelve bytes, so a WEBP without an extension is read too. If you use Amigram 0.5 beta, the client can offer the datatype itself when the system has none.
In short
- webp.datatype 45.2 reads lossy, lossless and transparent WEBP pictures and the first frame of animations on AmigaOS 3.x (68020+), AmigaOS 4.1 and MorphOS 3.
- The decoder is unchanged from 45.1 (libwebp 1.6.0); the Install script changes and can now run unattended from Easy2Install.
- Aminet has other WEBP datatypes with the same file name: Install asks before replacing one.
- Pixel checksum tests in emulators and on a real Power Mac G5; AmigaOS 4 on real hardware has not been tried yet.