New BMPX Picture DataType

miker1264 · 9298

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
on: September 21, 2019, 11:52:14 AM
Here is the new bmpx datatype. This is the AVIv0 version.

It is about 98% complete. It will Load & Save BMP, BMPX.

I'm still working on 32bit BMPX Alpha Transparency.



salvatore

  • Guest
Reply #1 on: September 21, 2019, 01:19:24 PM
nice miker :)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #2 on: September 21, 2019, 01:40:12 PM
It was tested somewhat on Icaros adesktop Hosted on Windows.
It should be considered experimental until you are sure it will work for you to Load and Save BMP's.

So don't delete the old BMP datatype and descriptor until you have tested BMPX. Move it to a storage folder.
You can't use both BMP & BMPX datatypes at the same time. BMP datatype has been superceded by BMPX.
 
Here is the source code for BMPX Picture DataType. It is released under AROS License as usual.
« Last Edit: September 21, 2019, 02:19:51 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #3 on: September 22, 2019, 07:41:21 AM
Revised source code for bmpx datatype.

This one has the makefile.bmpx file needed to compile the datatype.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #4 on: September 25, 2019, 08:05:59 AM
Does anyone have information about the format and proper layout of the datatype descriptor source file *.dtd used to make descriptors for new datatypes?

I'm trying to make a new one but it's not quite working for me. If I use the old BMP descriptor it has to be initialized each time before use. I would like to make BMPX using createdtdesc so it works.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #5 on: September 26, 2019, 01:04:56 AM
Congratulations! The New BMP Picture Datatype is now functional and ready for release.

Simply copy bmp.datatype to Sys:Classes/DataTypes and remove the old bmp.datatype

You can leave the BMP datatype descriptor in Sys:Devs/DataTypes. It's the same as the new one.

==========================================

It is recognized by MultiView as the BMP Picture Datatype.
It can Load Windows BMP files up to 24bit and 32bit BMPX files.
It can save 8bit and 24bit BMP files and 32bit BMPX files.

MultiView can display normal 32bit BMPX files using the new datatype but it can't display the
Alpha Transparency if the BMPX has an Alpha Mask. But this may be fixed in a later update.

Source code for version 1.0.0 will be uploaded soon.



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #6 on: September 26, 2019, 01:12:04 AM
btw considering your questions to dev ml, they might be answered sooner on our slack.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #7 on: September 26, 2019, 01:17:59 AM
btw considering your questions to dev ml, they might be answered sooner on our slack.

Thank you. How do I get there?




Samurai_Crow

  • Junior Member
  • **
    • Posts: 88
    • Karma: +32/-0
  • Hobby coder
Reply #8 on: September 26, 2019, 03:36:35 AM
You need to be invited.  Check your PM.

Edit: never mind the PM.  I would need your email to generate an invite.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #9 on: September 26, 2019, 06:28:50 AM
You need to be invited.  Check your PM.

Edit: never mind the PM.  I would need your email to generate an invite.

I sent you a message with my email.



mmartinka

  • Newbie
  • *
    • Posts: 48
    • Karma: +4/-0
Reply #10 on: September 26, 2019, 08:03:57 AM
Not correct show 1bit bmp format. The shows black picture only...

Congratulations! The New BMP Picture Datatype is now functional and ready for release.

Simply copy bmp.datatype to Sys:Classes/DataTypes and remove the old bmp.datatype

You can leave the BMP datatype descriptor in Sys:Devs/DataTypes. It's the same as the new one.

==========================================

It is recognized by MultiView as the BMP Picture Datatype.
It can Load Windows BMP files up to 24bit and 32bit BMPX files.
It can save 8bit and 24bit BMP files and 32bit BMPX files.

MultiView can display normal 32bit BMPX files using the new datatype but it can't display the
Alpha Transparency if the BMPX has an Alpha Mask. But this may be fixed in a later update.

Source code for version 1.0.0 will be uploaded soon.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #11 on: September 26, 2019, 08:58:48 AM
I'll continue testing with all bitdepths. I only tested 8bit, 24bit and 32bit so far.

Thanks for the information. If you find any other issues with loading or saving please message me and I will try to verify it and correct the issue.

I made two small changes to the original load function to allow loading 32bit bmp images. One involved the colormap the other added pixel format and alignwidth, alignbytes to load 32bit bmp's. The rest is as it was. It was written by someone else whose name appears in the source code. I haven't tested all of it.

The AROS picture datatypes have been in a sad state for a long time, many missing save functions. I hope to fix as much as I can but there may be room for improvement on that.

Did you test the original bmp datatype to find if it can load 1bit and 4bit correctly? I haven't.
« Last Edit: September 26, 2019, 09:45:18 AM by miker1264 »



mmartinka

  • Newbie
  • *
    • Posts: 48
    • Karma: +4/-0
Reply #12 on: September 26, 2019, 11:56:52 AM
So sorry, but I'm mistake.  :o
According to this web pages. The 1bit bmp and 4bit format works well. With your datatype.bmp
Here:
http://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html

I have two 1bit bmp picture and they do not show correct.
here:
https://drive.google.com/file/d/1_1QUQzQcSmqT1A6kO_AQu4V1VWv9Bpp9/view?usp=sharing
https://drive.google.com/file/d/1iftSt4MpxXte9Mlc6R7BTHO11wNbk2U_/view?usp=sharing



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #13 on: September 26, 2019, 12:10:00 PM
When I have some time I will take a look at your sample images and test 1bit and 4bit images with the old bmp datatype and new one to compare.

There are some sample bmp images in the AROS sources.




salvatore

  • Guest
Reply #14 on: September 26, 2019, 03:28:05 PM
thank you for your effort miker :)