Newest MultiView

miker1264 · 7602

miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #60 on: November 20, 2021, 04:29:32 AM
Here is the DTConv 68k



miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #61 on: November 20, 2021, 04:31:59 AM
I figured out the log serlog commandline for WinUAE debugging output.

It seems that the 68k JPEG datatype reaches the Save Function but it stops short at starting compression.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 2642
    • Karma: +64/-1
  • AROS One
    • AROS One
Reply #62 on: November 20, 2021, 11:21:30 AM
Here is the DTConv 68k
Thanks for DTConv 68k now I'll configure Dopus4 also on AROS One 68k :)

For the Amiga 68k version I have corrected (disabled) all the commands in error, now I'm left with the error you see in the screenshot, I tried to search but I can't find that string :(


miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #63 on: November 20, 2021, 03:11:40 PM
That may be Datatypes Library. Ill look at it today.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 2642
    • Karma: +64/-1
  • AROS One
    • AROS One
Reply #64 on: November 21, 2021, 10:33:49 AM
Thanks

I noticed that on Multiview x86/68k the Windows options Normalize, Minimize, Maximize, use separate Screen are not supported, this is an important option when images are too big and you need a Zoom to see the whole image like AROS MysticView does
« Last Edit: November 21, 2021, 10:50:27 AM by AMIGASYSTEM »



miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #65 on: November 27, 2021, 09:49:46 PM
Thanks

I noticed that on Multiview x86/68k the Windows options Normalize, Minimize, Maximize, use separate Screen are not supported, this is an important option when images are too big and you need a Zoom to see the whole image like AROS MysticView does

That's a good observation. As far as I know "Not Yet Implemented" comes to mind as far as Window Options.Setting Minimize, Maximize & Normal should be easy enough to write. Using "Window > Normal" to return a Window & its contents to original size after using resize gadget may also be useful.

There is also a small bug in the Newest MultiView that I corrected in my Experimental Version. When a large image is displayed then we choose "Open" from the menu MultiView uses the same window to display the new image without resizing it.

My solution was simply to close the window and open a new one of the correct size. That solution works so I'll bring the changes forward to the new version. I'd also like to give an option to save a resized image or choose to save the original.

Here's an idea. MultiView already has the framework to read MultiView Icon ToolTypes & to open an external program while sending it a filename such as with EXPORT. Why not use ToolTypes such as EDITPIC or EDITSND associated with the "Edit" Menu Item based on the current datatype GroupID. We would simply add "MSG_MEN_EDIT_FILE after EDIT_COPY.

So if you have a picture open then choose Edit from the menu it reads the ToolTypee "EDITPIC=" then sends the current filename to open ZunePaint or Lunapaint. That would be very useful.

Currently MultiView doesn't handle viewing Icon Files or Multi-Image support in General such as for Tiff Files. That can be added. There are many ways to "Improve" MultiView.  :)
« Last Edit: November 27, 2021, 10:11:49 PM by miker1264 »



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 2642
    • Karma: +64/-1
  • AROS One
    • AROS One
Reply #66 on: November 27, 2021, 10:25:15 PM
Yes there would be many things, the resize should be proportional to the image as MysticView and some other viewer on OS3, see small video attached.

By the way MysticView was a commercial software now is distributed on Aminet with the source included, the OS3 version works well on AROS 68k but if you try to resize the graphics is corrupted because of the slowness of the refresh.


Small video test Mysticview:

https://drive.google.com/file/d/1xBoHJNQLuXjTjD9iZNdAzeOChZlbaCCr/view?usp=sharing


miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #67 on: November 27, 2021, 10:59:52 PM
Ah. So the menu that you thought was AROS MultiView x86 running on Amiga OS3 was actually MysticView. I see now.  :)



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 2642
    • Karma: +64/-1
  • AROS One
    • AROS One
Reply #68 on: November 28, 2021, 12:28:58 AM
Ah. So the menu that you thought was AROS MultiView x86 running on Amiga OS3 was actually MysticView. I see now.  :)

No, the menu that I thought was from Multiview of "AROS 68k" was from Multiview OS 3.9 BB3.
« Last Edit: November 28, 2021, 12:37:29 AM by AMIGASYSTEM »



miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #69 on: November 28, 2021, 04:03:44 AM
I did some testing with the Newest MultiView 68k for the Export Menu Item.

I suspected that we merely have to change the Icon ToolType for EDITPIC.
I set the path for EDITPIC=Sys:Tools/MysticView/MysticView %s

In MultiView function GetOptions I changed the code slightly to look for it.
Of course this is just a test. I will make a new variable "cmdedit" & leave
"cmdexport" the way it was so that Project > Export continues to work.  :)

mvIcon = LoadProgIcon(startup, &mvDirLock, mvIconName);
    if (mvIcon)
    {
        const STRPTR *toolarray = (const STRPTR *)mvIcon->do_ToolTypes;
        char *s;
        //if (s = (char *)FindToolType(toolarray,"EXPORT"))
        if (s = (char *)FindToolType(toolarray,"EDITPIC"))
        {
            cmdexport = StrDup(s);
           D(bug("[MultiView] EXPORT = '%s'\n", cmdexport);)           
        }
    }
And guess what? It sent the current filename & opened MysticView!
On AROS x86_64 I set the ToolType as EDITPIC=Sys:Tools/Zunepaint %s.

So now I can simply add a new "Edit File" menu item to the Edit Menu.
Depending on the GroupID of the current datatype it will find the ToolType.

So Edit File will open the file in the editor of your choice.
If you have a text file loaded in MultiView & select Edit File it will look for EDITTXT.
Then it will open the selected text editor maybe Annotate or something similar.

The framework is already in place so why not use it? As an end user all you
must do to use Edit > Edit File in MultiView will be to set EDITPIC ToolType.
So there will be four ToolTypes to set as follows:
EXPORT=? EDITPIC=? EDITSND=? EDITTXT=?
You replace '?' with the path to your selected editor for each class.

If such as in my case you don't have a sound editor & you omit EDITSND
ToolType no worries! If it doesn't find the ToolText is will display a message.
"Editor Not Found!" when you select Edit File if you have a sound file loaded.




« Last Edit: November 28, 2021, 04:26:39 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #70 on: November 28, 2021, 05:12:49 PM
The Path with Spaces error with MultiView sending filepaths to external programs is a nuisance. But maybe it can be fixed.  8)

MultiView has another annoying problem. Resizing issues! When you open a larger image then a smaller one using "Open" the result is the screenshot. When you open a smaller image then a larger one MultiView tries to cram the larger image into a small window!

Currently the version number is 1.7 I believe. In the next version of MultiView the Resizing error will be fixed. I Also hope to add the framework for Edit File using MultiView ToolTypes. And hopefully version 1.8 will include Maximize & Normal Size Window Options. Each updated feature takes some effort.  :)

In perhaps version 1.9 I'd like to add an option to save resized images. Options, options! Also I'd like to add support to view Icons with Multi-Image support using WhichPicture & GetNumPictures. That's when we will need "Convert Picture to PNG" on the Picture Menu. It will save the current datatype to file as PNG. I'll explain later why that is important.
« Last Edit: November 28, 2021, 11:25:02 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #71 on: November 29, 2021, 12:33:05 AM
So my experiment was successful. I wanted to make sure I could send a File Path from MultiView with spaces included.

Normally the spaces indicate a command sequence "break" so the string is broken at that point. It's a problem if the break is not intentional.

To avoid this such as in a shell you would send the File Path to a program using quotes such as "filepath:new folder/new folder2/file".

The code on the MultiView side looks ok and the filepath looks correct.                                     

I hardcoded the filepath just to make sure the system will strip the quotes on the other end at the program that receives it.

See screenshot. Yes. It works. Now to encapsulate a character array within quotes to preserve the literal characters including spaces.
« Last Edit: November 29, 2021, 03:42:00 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #72 on: November 29, 2021, 03:40:39 AM
This was the solution to the filepath containing spaces error:

main.c on line: 1461 Encapsulate the filepath in quotes in case of spaces

char path[256];.
D(bug("[Multiview] **File Path FromLock: '%s'\n", filepath));
__sprintf(path, "%s%s%s", "\"",filepath,"\""); /* Encapsulate in Quotes */
D(bug("[Multiview] **File Path Adjusted: '%s'\n", path));
stags[0].ti_Data = (IPTR)path; //(IPTR)filepath

Now MultiView can successfully send filepaths to external programs with or without spaces. ;)
« Last Edit: November 29, 2021, 03:51:08 AM by miker1264 »



Amiwell

  • Legendary Member
  • *****
    • Posts: 2187
    • Karma: +31/-4
  • Peace
Reply #73 on: November 29, 2021, 12:04:25 PM
compliment miker attemp the final version :)
« Last Edit: November 29, 2021, 12:34:08 PM by salvo »



miker1264

  • Legendary Member
  • *****
    • Posts: 1352
    • Karma: +82/-6
Reply #74 on: November 29, 2021, 07:25:57 PM
compliment miker attemp the final version :)

Yes. I'm working on updates for MultiView version 1.8 which will include a fix for the resize issue using "Open". It will also include support for Edit File on the Edit Menu. And it may include the new functions for Maximize & Normal Size on Window Menu. And it will include the fix for sending filenames with spaces. There will also be "Open in New Window" on Window Menu. After using the Resize Gadget using Normal Size on the Window Menu returns the window & it's contents back to original size.

I'd like to add Convert Picture to PNG on Picture Menu. In the future when MultiView has Multi-Image support if we use ICNS datatype to open a Mac OSX icon when we find a 32bit PNG image we like what are the options? Save As IFF ? It doesn't support 32bit. PNG supports all the major bitdepths for saving.

It's also an easy way to open IFF Icon Images and save as PNG. We can also save an icon image as PNG & give it a .INFO file extension which makes it into a new single image icon file. And it's easy & convenient to open an image then save it as PNG.

I'll make a small PDF document explaining the new features.  ;)
« Last Edit: November 29, 2021, 08:26:29 PM by miker1264 »