dt2iff

OlafS3 · 4638

miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #15 on: November 13, 2021, 12:48:50 AM
I put together a small commandline app called dtconv. It will be capable of converting pictures or sounds to iff or other formats.

So far it can save a picture file as an ilbm as you can see. It will be an improvement on dt2iff.  ;)

For example you could convert an 8bit targa to an 8bit bmp or png or any other compatible picture type. Same for sound files.

« Last Edit: November 13, 2021, 12:55:07 AM by miker1264 »



OlafS3

  • Senior Member
  • ****
    • Posts: 455
    • Karma: +47/-0
Reply #16 on: November 13, 2021, 10:24:06 AM
sounds promising  ;) need 68k then too  8)



miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #17 on: November 13, 2021, 03:41:45 PM
sounds promising  ;) need 68k then too  8)

What do you use dt2iff for on a regular basis ?



OlafS3

  • Senior Member
  • ****
    • Posts: 455
    • Karma: +47/-0
Reply #18 on: November 14, 2021, 10:35:24 AM
I use Magellan so I have a picture filetype in it and there put a option "convert to IFF..." (context menu)
« Last Edit: November 14, 2021, 10:50:59 AM by OlafS3 »



OlafS3

  • Senior Member
  • ****
    • Posts: 455
    • Karma: +47/-0
Reply #19 on: November 16, 2021, 12:31:37 AM
there is a fantastic converter of tons of atari formats to png called fail_68k on aminet. I searched for it and found the open source project behind

https://sourceforge.net/projects/recoil/

it seems it even has extended to amiga and other retro systems now

perhaps someone could look at it. Would be nice to have for our platform
« Last Edit: November 16, 2021, 12:39:33 AM by OlafS3 »



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 2076
    • Karma: +48/-1
  • AROS One
    • AROS One
Reply #20 on: November 16, 2021, 01:06:11 AM
If it can be useful for AROS 68k you can use "Gfxcon" excellent conversion program and and not only.

Gfxcon is "card-ware/e-mail-ware":

Image format converter that can load and save most formats:

Load: ILBM, LBM, RGB8, RGBN, PCX, IMG, BMP, RLE4, RLE8, DIB,
      GIF, TIFF, JPEG, RGB-Raw, Targa

Save: ILBM, PCX, GIF, JPEG, RGB-Raw, Postscript

https://aminet.net/package/gfx/conv/gfxcon
« Last Edit: November 16, 2021, 01:10:23 AM by AMIGASYSTEM »



miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #21 on: November 16, 2021, 02:13:20 AM
The DTconv commandline app I just put together does all that also. Currently it has some issue saving PCX, Tiff and Targa.

But it's still a work in progress. So far it supports all the main picture datatypes for picture file conversion. I'm pleased with it.



miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #22 on: November 16, 2021, 08:28:12 PM
The dtconv app is ready. I will post it later today.



miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #23 on: November 17, 2021, 04:04:25 AM
up till now DTConv commandline app could convert any supported picture type to all picture datatypes except the newer ones - TGA, PCX, TIFF & WEBP.

But...I concluded that the problem was the return type for OM_NEW for TGA & PCX. As a test I changed the return type for PCX to match the others...

And now DTConv can convert to 8bit PCX. So I assume the same modification will work for TGA. PCX wasn't returning the Datatype Object correctly.



IPTR PCX__OM_NEW(Class *cl, Object *o, Msg msg)
{
    Object *newobj;
   
    D(bug("[bmp.datatype] %s()\n", __func__));
   
    newobj = (Object *)DoSuperMethodA(cl, o, msg);
    if (newobj)
    {
        if (!GetPCX(cl, newobj))
        {
            CoerceMethod(cl, newobj, OM_DISPOSE);
            newobj = NULL;
        }
    }

    return (IPTR)newobj;
}

Oh. I need to change the D(bug) text also.  :)
« Last Edit: November 17, 2021, 06:11:38 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #24 on: November 17, 2021, 05:32:42 AM
For x86_64 this app works well.

For Icaros x86 as long as the picture datatypes are updated it also works well.

To compile the dtconv app at the commandline in Icaros x86 do this: gcc dtconv.c -o DTConv
Then copy this file to the C directory. Also included in the zip file is the Readme with instructions.




miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #25 on: November 17, 2021, 05:43:59 AM
Here are the compiled versions for Icaros x86 and Icaros x86_64,

it's a pleasure to use on 64bit where my datatypes have been updated.

I look forward to using my new tool to convert and test new datatypes.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 2076
    • Karma: +48/-1
  • AROS One
    • AROS One
Reply #26 on: November 17, 2021, 12:36:10 PM
miker I created more buttons on Dopus4 for DTConv, clicking on a file this is converted to the same path, of course now the Audio and Graphics files obtained are empty, 0 Byte, when they are ready your datatypes will be full :)


miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #27 on: November 17, 2021, 01:50:06 PM
miker I created more buttons on Dopus4 for DTConv, clicking on a file this is converted to the same path, of course now the Audio and Graphics files obtained are empty, 0 Byte, when they are ready your datatypes will be full :)

AROS One x86 ?

Which datatype did you try to convert ?

Note: sound conversion doesn't work yet. Just pictures.



miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #28 on: November 17, 2021, 03:07:23 PM
AMIGASYSTEM

In an older version of AROS One x86 I was able to use dtconv to convert a 24bit BMP to PNG as in the screenshot. I was also able to convert an 8bit PNG to 8bit GIF as well as an 8bit BMP.

This is about all you can convert at the moment. You need the updated picture.datatype to convert pictures to ILBM and you will need updated BMP, JPEG, PCX and TGA datatypes.

I will compile these later today for 68k, x86 and x86_64 so that they will be available to you.



miker1264

  • Legendary Member
  • *****
    • Posts: 1287
    • Karma: +82/-2
Reply #29 on: November 17, 2021, 04:10:42 PM
DTConv just converted the first 8bit Targa image on Icaros x86_64.  :)

Based on changes to OM_NEW in the PCX Datatype I made the same adjustment for TGA.

The OM_NEW must return a Datatype Object or DTConv won't work. All standard AROS picture datatypes return DT Objects.



« Last Edit: November 17, 2021, 05:25:50 PM by miker1264 »