dt2iff

OlafS3 · 4291

OlafS3

  • Senior Member
  • ****
    • Posts: 405
    • Karma: +46/-0
on: November 11, 2021, 01:15:14 PM
How some know I do a 68k distribution  ;)

I heavily use 68k components from aminet

one very nice (I use) is dt2iff

http://aminet.net/package/gfx/conv/dt2iff

unfortunately without source

but this with source:
http://aminet.net/package/util/conv/dt2iff

Perhaps Mike feels motivated to do a Aros (X86) version

It is really cool because you can basically convert anything supported by datatpyes to iff



miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #1 on: November 11, 2021, 03:03:53 PM
That looks interesting. I will take a look.

DTConvert does something similar as well.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 1854
    • Karma: +46/-1
  • AROS One
    • AROS One
Reply #2 on: November 11, 2021, 04:22:52 PM
miker eventually then with simple examples you tell us what changes you have done, so we start to learn something.

Today I found a simple OS3 source of "Bin2ISO" that I've compiled with Murks and it seems to work well on AROS One x86, I attach archive with source and Bin2ISO AROS x86 that I hope will be of interest to someone :)


miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #3 on: November 11, 2021, 05:07:22 PM
AMIGASYSTEM

For those who maintain their own distros such as yourself it is a great benefit to be able to find code that you can compile yourself to include in your distribution. Small apps that compile easily. But sometimes it isn't so easy.  :)

Murks may work well enough but here is something I learned. When I started five years ago my first real program after my Hello World was "Icon2PNG" which split a png icon into two png files. I used DevCPP IDE to write it and compile it. It was great. It compiled with no issues. However, all was not well... :(

About a year later I learned that it was possible to use gcc at the commandline to compile small programs. So I tried to compile Icon2PNG. Wow! There were so many errors I couldn't count them all. So there's a lesson learned. Not all compilers are the same. Maybe it would benefit you to learn to compile with gcc. Likely if it compiles using gcc it will compile in Murks as well.



OlafS3

  • Senior Member
  • ****
    • Posts: 405
    • Karma: +46/-0
Reply #4 on: November 11, 2021, 05:55:59 PM
I have high respect from anyone learning C or C++  :)

in normal life (if programming) I use ObjectPascal (Delphi), depending on task PHP

if doing anything for amiga I used Hollywood. And I also want to do more with Amos Pro (and the new Amos Pro AGA) and Amiblitz. I am also interested in E perhaps. But that is all a matter of time. Amiga is very different, I have collected lots of libraries (on 68k) for all sort of purposes. But I did not find time and motivation to start there. If I did something with amiga I played with the configuration of my distribution and mostly used ready compiled software to include. The rest were simple hollywood components. I am a little lazy there  :o

A component like dt2iff is very interesting for f.e. Amigasystem with his distribution because you can use it for a lots of formats. Genious thing, the datatypes...



miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #5 on: November 11, 2021, 06:22:10 PM
Of course dt2iff would be useful. I need something like that mostly to convert picture files using datatypes.

I'm currently working on something similar to convert picture types using Lunapaint. I still have to add more datatypes. Lunapaint is also useful for testing picture datatypes.  :)

I'll take a look later today at dt2iff to see if it can be easily converted for use with AROS x86 and x86-64. We'll see.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 1854
    • Karma: +46/-1
  • AROS One
    • AROS One
Reply #6 on: November 11, 2021, 06:30:04 PM
miker about Multiview, you could add in the menu the command "search", in my opinion it is very useful when you have to search something


miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #7 on: November 11, 2021, 06:32:07 PM
miker about Multiview, you could add in the menu the command "search", in my opinion it is very useful when you have to search something

Search for what for example?

I'm interested in adding the functionality of something like DTConvert and Multi-Image support such as for Tiff images or icon files or other file types that support multiple images.

For learning purposes you should try to compile the version of DirTree that I provided with the two corrections. Use gcc at the commandline to compile. Navigate to the directory containing the file DirTree.c in a shell then enter "gcc DirTree.c -o dirtree". The -o is the output file which should appear in the same directory. The "dirtree" file is the x86 compiled version. Then compile the original DirTree.c using gcc and take note of the errors it gives. It will even give line numbers so you can compare the changes. That is a good way to learn how to compile code.
« Last Edit: November 11, 2021, 07:08:02 PM by miker1264 »



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 1854
    • Karma: +46/-1
  • AROS One
    • AROS One
Reply #8 on: November 11, 2021, 06:40:51 PM
For example to search for a word in an ascii document, guides, htlm etc..

Another very important thing would be to create an exe.datatypes, it serves to know what an executable uses to run, on OS3 it exists and works well.


miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #9 on: November 11, 2021, 11:26:43 PM
In my opinion having a search function in MultiView wouldn't be the correct location. That search functionality should be a function of the text editor.

Something that would benefit MultiView though is the ability to List all the Datatypes on the system and being able to save that information to a text file.

I looked at the code for dt2iff. It is very simplistic and it's only about 85 lines of code. It should be easy enough to modify the includes and compile for AROS.

That would allow testing but I suspect from what I can see that it will only work with Pictures and Sound files. Text and document types aren't compatible yet.

But as far as having a similar functionality included in MultiView it may be in the form of a couple functions such as "Convert" as the main function that parses the type of datatype objects as source and destination then it will route the traffic to "ConvertDatatype" then that function finds the basenames and calls "ConvertPicture" or "ConvertSound". The modular approach allows us to add more functionality later such as Text Datatype or Animation Datatype support. Modular is better IMHO.

I'm not sure what an EXE Datatype would be useful for. What type of information does it provide that can't be gathered from other means? Such as exe type, file size...


« Last Edit: November 12, 2021, 12:00:06 AM by miker1264 »



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 1854
    • Karma: +46/-1
  • AROS One
    • AROS One
Reply #10 on: November 12, 2021, 01:11:34 AM
Regarding the "Search" on Multiview in my opinion is important because on the Workbench normally many icons of TXT Documents, GUIDE, HTLM are associated to Multiview and the "Search" speeds up if you want to read the interested part of the topic.

the exe.datatypes is very important when an executable doesn't work, in many cases Snoopdos and similar don't provide all the information, while Multiview with one click lists with certainty what an executable needs to work.

I attach small video that shows what Dopus4 needs in order to work.

https://drive.google.com/file/d/17l6BA3XUtrJvvusoy7JHJzfT6p6qk5O-/view?usp=sharing


miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #11 on: November 12, 2021, 02:01:28 AM
As far as dt2iff MultiView already provides Save As IFF and since I wrote the DTM_WRITE for saving ILBM in Picture Datatype I'm pretty sure it works for picture files. Not sure about DTM_WRITE for Sound Datatype for Save As IFF. That's something to look at in the near future.

If you could explain better how such a MultiView Search function would work and for what files? What is the result of Search? Where is the information displayed? Not sure I understand it.

BTW there is a newer version of MultiView that @deadwood uploaded to the repository from about 6 months ago that has an "Export" menu item for converting datatypes. I tried to compile it for testing but there are many errors related to the catalog file. Until I fix the menu items I can't compile it and test it.
« Last Edit: November 12, 2021, 02:04:41 AM by miker1264 »



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 1854
    • Karma: +46/-1
  • AROS One
    • AROS One
Reply #12 on: November 12, 2021, 08:37:03 AM
I don't know if my English was understandable, for exe.datatypes the video should make better understand what I meant

Regarding the "Search" option I was referring to the search engine that all text readers have to search for a word or a string, see screenshot, with EvenMore for example if you click on "Search" from the menu it opens a search bar like the one in FireFox.
« Last Edit: November 12, 2021, 05:33:39 PM by AMIGASYSTEM »



miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #13 on: November 12, 2021, 05:23:40 PM
As for the Export Datatype Function in MultiView I completed my analysis by comparing all the files to see what changed.

Other than adding support for the "Export" menu item and lots of new debug the locale.c file lists include file "strings.h" but the file is missing. This file contains the definitions for all menu items. The good thing is that I intended to revise MultiView anyhow.

That may be the reason the compiler gives errors about the menu items being undefined. Later today I'll try to compile it.
I'm not sure how AROS Abiv1 compiled with MultiView errors! But it seems it did compile ok. So I downloaded v 10-16-2021.

The "search" functionality is part of the app itself not MultiView.

Also dt2iff seems redundant if MultiView already does that with Save As IFF. I will test it with pictures, text and sound files. I will look fot DTM_WRITE in the Text and Sound datatypes to start.
« Last Edit: November 12, 2021, 05:54:02 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1224
    • Karma: +80/-2
Reply #14 on: November 12, 2021, 08:04:21 PM
@OlafS3

I'm going to try setting up a simple commandline dtconvert that will also convert to iff. It can be used for pictures and sound.

It will be similar to the Linux commandline "convert" application.

Other than that the same functionality will be in the newest version of MultiView which I believe is v1.7 from 11-02-2020. 
« Last Edit: November 12, 2021, 08:13:03 PM by miker1264 »