Datatype Conversion Tool

miker1264 · 3966

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
on: November 25, 2021, 07:29:09 PM
After several hours of work the new user interface for DTConv is coming along nicely.

Now I just have to connect the code to the gadgets.
« Last Edit: November 25, 2021, 09:27:42 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #1 on: November 26, 2021, 12:03:47 AM
It's nice that the same GUI compiles easily and it works well on 68k & x86_64. It's based on GadTools. So it will compile easily on IcarosDesktop x86 as well. It's small. It consists of a Cycle Gadget, 2 String Gadgets, & 4 Button Gadgets.

On x86_64 The New Datatypes Conversion GUI works with the MultiView Export Menu Item!  :)

A week ago I couldn't have imagined this journey would happen. It has been so satisfying setting up this new conversion tool.

Whichever file is open in MultiView will be sent to the GUI as the SourceFile.Then you select the Datatype to convert to and the destination filename. If it's valid the file will be converted.
It doesn't matter what program is called DTConvert. MultiView will open it from Export Menu Item.

The MultiView Export Item in MultiView 68k should also open the New GUI but it isn't working. I will put some debug messages in MultiView to find out why that part ins't working.

The output window won't be part of the final program. It's just being used for testing purposes.
« Last Edit: November 26, 2021, 12:34:00 AM by miker1264 »



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #2 on: November 26, 2021, 03:03:58 AM
nice miker :)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #3 on: November 26, 2021, 12:39:34 PM
nice miker :)

To make it more interesting I may add another button called "DataTypes" between Convert & Cancel. It will display a message about the source & destination GroupID's & BaseNames.  8)  Or just keep it simple.
« Last Edit: November 26, 2021, 01:03:19 PM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #4 on: November 26, 2021, 02:02:50 PM
It's nice that the same GUI compiles easily and it works well on 68k & x86_64. It's based on GadTools. So it will compile easily on IcarosDesktop x86 as well. It's small. It consists of a Cycle Gadget, 2 String Gadgets, & 4 Button Gadgets.

Beautiful simple and effective !


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #5 on: November 26, 2021, 04:31:32 PM
Miker I noticed that Multiview and DTConv cannot convert PNG images that have a transparence around them, the conversion produces a 0 KB file.


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #6 on: November 26, 2021, 09:07:01 PM
Miker I noticed that Multiview and DTConv cannot convert PNG images that have a transparence around them, the conversion produces a 0 KB file.

That depends on which datatype you are trying to convert to. For example BMP supports 32bit images with alpha.

If the PNG has transparency then it is 32bit with alpha channel. If you try to convert to JPEG or PNM it won't work.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #7 on: November 26, 2021, 09:10:52 PM
After doing some searching and testing I found out the simple solution as to why MultiView 68k wasn't activating Export on the Project Menu.

It was looking for an icon to get the ToolType "EXPORT". Previously I thought it was looking for the DTConvert Icon. But after I added some debug to MultiView I found it.

The ToolType Text is actually added to the MultiView Icon instead. So I added to the MultiView Icon and now it works perfectly.  :)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #8 on: November 26, 2021, 09:24:34 PM
Here is the current source code for the Datatype Conversion Tool. It's a little messy but it's a good start.

Still much code to add to it such as ConvertDatatype, ConvertPicture and some other functions.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #9 on: November 26, 2021, 09:41:35 PM
Here are the 68k binaries for the Datatype Conversion Tool & the Newest MultiView & Icons.

I included a small text file with instructions. Edit the MultiView Icon & insert the ToolType.

The export program can be activated from within MultiView using Project > Export.
Or you can navigate to Sys:Tools and start DTConvert directly as a standalone program.

This is not the original DTConvert program. This is my homegrown alternative to that.
I simply named it DTConvert because that's what MultiView is looking for in the system.

If you start it with Export from the menu MultiView will send the active datatype filename as SourceFile.
For the destination file requester you must completely re-enter the filename or the conversion won't work.


« Last Edit: November 27, 2021, 12:55:21 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #10 on: November 27, 2021, 12:42:46 AM
You will need these updated 68k datatypes for the Datatype Conversion Tool to work correctly.




OlafS3

  • Legendary Member
  • *****
    • Posts: 544
    • Karma: +50/-8
Reply #11 on: November 27, 2021, 02:40:23 AM
thanks Miker



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #12 on: November 27, 2021, 03:42:33 AM
Thanks Miker I will install everything on my AROS One 68k, then I will make a nice news for these works of yours !

Thanks for the info for the PNGs, I had guessed that was the problem, in fact the Paint I use on my PC converts transparent PNGs to all formats but the transparency is lost, except for BMP which however loses the quality of the PNG.


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #13 on: November 27, 2021, 09:51:34 AM
Thanks Miker I will install everything on my AROS One 68k, then I will make a nice news for these works of yours !

Thanks for the info for the PNGs, I had guessed that was the problem, in fact the Paint I use on my PC converts transparent PNGs to all formats but the transparency is lost, except for BMP which however loses the quality of the PNG.

Using the Datatype Conversion Tool you can now convert Picture-Picture, Sound-Sound & Either to IFF (ILBM or 8SVX).

I'm thinking of adding a menu system with additional items.
Maybe a Project Menu with "File Name, File Data, About & Exit"
« Last Edit: November 27, 2021, 02:03:56 PM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #14 on: November 27, 2021, 11:28:55 AM
Miker I tested Multiview and DTConv GUI and they are perfect on my AROS One 68k, will there be also forAROS x86 ?


I read in Radme that there are problems with Wanderer while with Dopus Magellan works fine.


Of course Wanderer lacks a tool to replace icon images and a tool to change the icon type, but these problems can be solved with two utilities taken from Aminet.

After this Wanderer will be much faster and more reliable than Dopus Magellan (magellan slows down the icons and as said on the Web has many unsolved bugs), this is valid both for AROS 68k and AROS x86.

In fact it is for this reason that I have never used Dopus5 Magellan on my systems both OS3 and AROS :)