bbm (deluxe paint enhanced images) support

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
gilles504
Posts: 6
Joined: Mon Feb 04, 2019 2:16 pm

bbm (deluxe paint enhanced images) support

Post by gilles504 »

hello,
it seems .bbm is not correctly diplayed
Capture du 2019-02-04 15-21-48.png
There is a trick for odd X size in bbm but I suppose here RLE is not taken into account.
User avatar
deus-ex
Posts: 171
Joined: Mon Sep 20, 2004 7:24 pm
Location: Earth

Re: bbm (deluxe paint enhanced images) support

Post by deus-ex »

You should attach an example .bbm image to support your claim.
gilles504
Posts: 6
Joined: Mon Feb 04, 2019 2:16 pm

Re: bbm (deluxe paint enhanced images) support

Post by gilles504 »

phpbb does not permit .bbm extension in attachment (or maybe it's firefox in mime types)

but you will find it here:
http://www.alternative-system.com/files/magic1.bbm

bbm is a brush, most of brush are odd size when a grid is used. I've seen that some even sized bbm files are ok so I think that 16bit align is the issue here.
User avatar
deus-ex
Posts: 171
Joined: Mon Sep 20, 2004 7:24 pm
Location: Earth

Re: bbm (deluxe paint enhanced images) support

Post by deus-ex »

Thanks for providing an example.
gilles504 wrote: Tue Feb 05, 2019 11:20 amphpbb does not permit .bbm extension in attachment (or maybe it's firefox in mime types)
True, but you can trick the system. Add a permitted extension to the file name and provide some info to remove that extension before attempting to view it. Or actually compress the image to a ZIP, RAR or 7-Zip archive.

And for everyone interested, this is what the image is supposed to look like:

Image
Attachments
magic1.bbm.zip
Remove file extension .zip before viewing!
(48 KiB) Downloaded 35 times
gilles504
Posts: 6
Joined: Mon Feb 04, 2019 2:16 pm

Re: bbm (deluxe paint enhanced images) support

Post by gilles504 »

Thanks, last time I saw this one was on my 486 with DPE ;) (or maybe with doxbox)

to be close to perfection bbm should use the transparency color because it's a brush. (tranparency is defined somewhere in the "BMHD" section if I can trust my old Borland C code).
User avatar
deus-ex
Posts: 171
Joined: Mon Sep 20, 2004 7:24 pm
Location: Earth

Re: bbm (deluxe paint enhanced images) support

Post by deus-ex »

The image you provided is a 8-bit image, i.e. there is no additional alpha channel included. None of the colors from the palette was flagged as transparent. I fixed that now in the PNG-format example:

Image
gilles504
Posts: 6
Joined: Mon Feb 04, 2019 2:16 pm

Re: bbm (deluxe paint enhanced images) support

Post by gilles504 »

just checked with DPE and the tranparency is defined (I think it's the 0xFF white at the end of the palette):
in my old code section "BMHD" is len(32) brushx(16) brushy(16) ??(16) ??(16) ??(16) ??(16) transparency(16) ??(??)

If I remember correctly dpe uses the last background color to define the brush transparency color.
Capture du 2019-02-05 18-01-15.png
User avatar
deus-ex
Posts: 171
Joined: Mon Sep 20, 2004 7:24 pm
Location: Earth

Re: bbm (deluxe paint enhanced images) support

Post by deus-ex »

Ah, I understand. The program I used to display the .bbm image and alter the palette does not recognize the transparency flag. I'm glad it is able to load and display this format since it is not officially supported, but it appears to share similarities with the supported Interleaved Bitmap format (.iff, .lbm). And yes, I also set the last color in the palette (white) to transparent.

EDIT: Changed "does recognize transparency" to "does NOT recognize transparency", obviously. :)
gilles504
Posts: 6
Joined: Mon Feb 04, 2019 2:16 pm

Re: bbm (deluxe paint enhanced images) support

Post by gilles504 »

lbm and bbm are nearly identical and have the same amiga origin (3 char name is a PC/DOS convention for deluxe paint PC, on amiga an image does not always have a suffix but .iff is common for all iff formats (not only images but also text, audio and music))
Post Reply