Author Topic: AROS Picture DataTypes  (Read 770 times)

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
AROS Picture DataTypes
« on: September 09, 2019, 03:24:38 AM »
While trying to find an easier way to export ilbm images from glowicons
I discovered "INFO datatype" which is also installed in the latest version of Icaros Desktop.

While reading the sources to find another way to export the iff icon images I read something
very interesting, for me at least. At the bottom of the README for INFO datatype was this:

========
 Author
========

OS4 version:
   Fredrik Wikstrom
   <fredrik@a500.org>
   
AROS version:
   Miloslav Martinka

Thanks:
   Yannick Erb
   Picture Datatype creation package.

If was this last part that caught my attention. "Picture Datatype creation package."?? Where is this magical package?

I went back to AROS Developer Docs/Libraries/DataTypes that I have visited so many times trying to figure out how
to compile an AROS Picture DataType and there is was at the very bottom, a link to the "pictdt_creationpackage".
So now I was really curious and a little dubious I must admit. Every other attempt to compile picture datatypes has
failed, so I didn't know if this would work. So I downloaded, installed and copied "tools" to my Icaros Desktop "bin".

As you can probably see by the screenshot it worked...now I will change a few lines in my ShowPicture program to
Test Picture Datatypes so that I can add my code to the missing save functions. I have written all my own functions
for BMP, ILBM, TGA & PCX. Especially for "Save ILBM" I have "SaveBitmapPic" & "SaveRGBPic".

Recompiled BMP Datatype. Testing now...

It seems the BMP datatype still can't save properly. I don't believe that ILBM datatype has a Save Function yet.
So I'll revised BMP and recompile and test it over the next week. I'll verify the ILBM datatype to see if anyone
beat me to it and actually wrote a "Save ILBM" function. If not, I have all the code necessary to do so and now
I can actually Compile Picture Datatypes!! YES.

Maybe "pictdt_creationpackage" was there all along but I just didn't see it there?! I'm not sure but it works!
« Last Edit: September 09, 2019, 03:37:07 AM by miker1264 »

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #1 on: September 09, 2019, 03:54:12 AM »
Does anyone have contact information for Miloslav Martinka?

I'm trying to use the INFO Datatype but I'm not sure how to instantiate it.

for a new picture datatype:

DTImage = NewDTObject(   file_name,
                     (DTA_SourceType),   DTST_FILE,
                     (DTA_GroupID),      GID_PICTURE,
                     (PDTA_Remap),      FALSE,
                     (OBP_Precision),   PRECISION_EXACT,
                     TAG_DONE);

In the BMP datatype:
IPTR BMP__OM_NEW(Class *cl, Object *o, Msg msg)

In the INFO datatype, the last part is different.
IPTR INFO__OM_NEW(Class *cl, Object *o, struct opSet *msg)

If I can figure out how to use the INFO datatype I can export the iff icon images for glowicons for Icon Factory.
The next step will be to use ILBMtoIcon as a guide to write the "Save IFF Icon File" function.

mmartinka

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Re: AROS Picture DataTypes
« Reply #2 on: September 09, 2019, 11:26:44 AM »
The original package is on the www.a500.org
I converted the .info datatype into AROS os only.
Maybe he would help Fredric Wikström...

Sorry for my bad english :)

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #3 on: September 09, 2019, 02:48:51 PM »
The original package is on the www.a500.org
I converted the .info datatype into AROS os only.
Maybe he would help Fredric Wikström...

Sorry for my bad english :)

Very Good. Thank you.

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #4 on: September 11, 2019, 06:24:45 AM »
I have successfully compiled a new Windows Bitmap (BMP) picture datatype.

It is called BMPX. It will include all the Load and Save functions for BMP up to 24bit
and BMPX with 32bit and Alpha Transparency. So it will be designed to handle BMP & BMPX.

I'll revised the Save_BMP function and include Save_BMPX according to the bit depth.

Hopefully It will be done by this weekend. We'll see. It may require more testing. ;-)

 

I have Save Functions for BMP, PCX, TARGA and ILBM including Saving Bitmap Pics of 8bitplanes and below & Deep Images (IFF24).
I could revise the SaveRGBPic function to Save IFF32 but currently I don't believe the AROS ILBM datatype can read IFF32.

The ILBM Save Functions took the longest to write because it required a lot of research. It took about three months to complete.
The PCX Save Function was the second most difficult. It took an entire weekend to write that one. BMP format is not so difficult.

We'll see how it goes.

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #5 on: September 11, 2019, 06:34:51 AM »
I adapted my ShowPicture Program to Save BMPX using the new picture datatype for testing.

The new datatype successfully opens BMP files and saves, but I still have to refine the save process.

mmartinka

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Re: AROS Picture DataTypes
« Reply #6 on: September 11, 2019, 06:53:35 AM »
very well  :)

o1i

  • Newbie
  • *
  • Posts: 22
  • Karma: +1/-0
Re: AROS Picture DataTypes
« Reply #7 on: September 11, 2019, 08:43:48 AM »
The ILBM Save Functions took the longest to write because it required a lot of research. It took about three months to complete.

Nice, thanks for that one. I noticed a few weeks ago, that ilbm saving is not possible. I had a quick thought about implementing it, but realized, I have no time for it. So thanks for your work!

paolone

  • Moderator
  • Member
  • *****
  • Posts: 223
  • Karma: +3/-0
Re: AROS Picture DataTypes
« Reply #8 on: September 11, 2019, 03:42:08 PM »
If was this last part that caught my attention. "Picture Datatype creation package."?? Where is this magical package?


I'd bet you're looking for this:
http://archives.aros-exec.org/index.php?function=showfile&file=datatype/utility/picdt_creationpackage_v2.0.i386-aros.zip


By the way, maybe I should consider budling it with Icaros Desktop, if I already didn't, in Extras/development.

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #9 on: September 11, 2019, 04:36:39 PM »
If was this last part that caught my attention. "Picture Datatype creation package."?? Where is this magical package?


I'd bet you're looking for this:
http://archives.aros-exec.org/index.php?function=showfile&file=datatype/utility/picdt_creationpackage_v2.0.i386-aros.zip


By the way, maybe I should consider budling it with Icaros Desktop, if I already didn't, in Extras/development.

paolone,
Thank you.
I downloaded the picdt creation package and installed the Tools in Development/bin a few days ago. Since then I've been working on BMP datatype, then others when it's done.

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #10 on: September 11, 2019, 04:42:48 PM »
The ILBM Save Functions took the longest to write because it required a lot of research. It took about three months to complete.

Nice, thanks for that one. I noticed a few weeks ago, that ilbm saving is not possible. I had a quick thought about implementing it, but realized, I have no time for it. So thanks for your work!

o1i,
I remember one of the Core developers mentioning that "Save As IFF" (ILBM) is disabled in Datatyoes Library because there's no Save function. Even if you write a new save function and compile the datatype you can't test it till it is enabled in the library. Maybe ask Neil or someone to enable it.

In the meantime, thank you for your efforts.

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #11 on: September 11, 2019, 04:48:15 PM »
paolone,

Do we have a 64bit version of the picdt build tools so I can compile 64bit pic datatypes?

paolone

  • Moderator
  • Member
  • *****
  • Posts: 223
  • Karma: +3/-0
Re: AROS Picture DataTypes
« Reply #12 on: September 11, 2019, 09:45:48 PM »
paolone,

Do we have a 64bit version of the picdt build tools so I can compile 64bit pic datatypes?

AFAIK we don't have a 64bit build of this picdt package. I don't know exactly if it would help ATM, since we don't have a working 64bit gcc for AROS. Please have a look at my posts on icarosdesktop.org about compiling programs for 64bit AROS. You need Linux to do that (either using a crosscompiler, or the AROS build system directly).

miker1264

  • Member
  • ***
  • Posts: 180
  • Karma: +7/-1
Re: AROS Picture DataTypes
« Reply #13 on: September 12, 2019, 04:32:33 PM »
The bmpx picture datatype is coming along nicely.
It should be finished in a few days. Then testing.

This weekend I'll start to add Save Functions for the AROS ILBM datatype. It is in three main parts: Save_ILBM which directs traffic according to bitDepth to either SaveBitmapPic for 8 bitplanes and below or SaveRGBPic for 24 or 32 bitplanes. It may take two weeks to complete the dayatype.

I'll post completed binaries and source code for both under the AROS License.

Yannick

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
Re: AROS Picture DataTypes
« Reply #14 on: September 12, 2019, 05:39:53 PM »
The picture datatype creation package is only a collection of tools that should be available when you build Aros yourself.
At the time I've created it they were not part of the distributed files, it might be the case now.

Just search for them in a 64bit built and you should have them.