New MultiView

miker1264 · 8585

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #15 on: October 23, 2019, 08:18:19 PM
Here's the 32bit PNG file that I saved using MultiView x64.
You can see it's not purple, and it has Alpha Transparency.



paolone

  • Moderator
  • Legendary Member
  • *****
    • Posts: 568
    • Karma: +90/-0
Reply #16 on: October 24, 2019, 10:04:43 AM
Great!


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #17 on: October 24, 2019, 11:40:11 AM
Great!

The good news is that my new function Save As PNG is working well on MultiView 64bit.

The bad news is that the existing MultiView 64bit has serious issues that causes it to crash horribly bringing down the entire system! I've asked for some assistance from developers. We'll see if anyone offers. If so it may take a few days to narrow down the issues as far as Intuition, Dos, Exec or just isolated to MultiView and datatypes system. If I fix these issues on my own it may take a few weeks. I'll have to do a lot of research.

Of course I could just add my PNG function and leave it the way it is now. That would be bad. :-(

Update: The 'Open' menu item error that caused MultiView 64bit to crash the system has been successfully resolved. I'm pleased with that outcome.
There are still some issues but I'm working through them and finishing up Save As PNG by adding support for saving 8bit PNG files. It now saves 24bit & 32bit.
« Last Edit: October 25, 2019, 12:56:24 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #18 on: October 25, 2019, 12:58:33 AM
Here's how I went about fixing the Open Error...Read the text file if you'd like to know.

There is another issue when an oversized PNG image is opened and we choose 'Fit_To_Window' on the Picture Menu. It gets rescaled and when it is displayed it turns purple! That's because the RGB components get scrambled around for some reason that only affects the display. The datatype object that has been sized is fine and it saves correclty. So the easy solution would be to close the original window without closing the dto and keeping the filename then open a new window.

/From WinCleanup();
KillWindow();
KillMenus();
KillGadgets();
FreeVisual();
//CloseDTO();
KillICObjects();
KillFont();
Setup(filename);
« Last Edit: October 25, 2019, 01:13:14 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #19 on: October 26, 2019, 10:10:19 PM
I have solutions for the two remaining redraw issues for MultiView 64bit. When using resize gadget on a MultiView window on Icaros 64bit MultiView will crash bringing down the system. The solution is to remove the size gadget and instead have two resize methods which are Zoom and Fit Width menu items. Zoom In / Zoom Out can use the menu or keyboard input. Fit Width will use a Numeric Input Box. The new size will be calculated by aspect and the image gets resized.

Zoom In / Zoom Out already works I'll just need to find some good zoom levels. Fit Width should work also based on user input and aspect ratio.

The second issue is "Purple PNG" that is a redraw issue that happens when a png mage is loaded that is larger than the display area. When "Fit_To_Window" is selected the image gets resized correctly to fit but it turns purple.

The window containing the original image gets resized and the new image is forced into the old window. The solution is to completely close the window and open a new window at the appropriate size. The image will then resize correctly.

Update: Save As PNG now works correctly to save 8bit or less (ILBM) as 8bit PNG. It can also save 24bit and 32bit PNG files.
« Last Edit: November 10, 2019, 11:20:10 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #20 on: November 10, 2019, 11:17:28 AM
New MultiView can now Save As PNG for 8bit, 24bit and 32bit. There is still some work to do to correct a few minor issues.



aurabin

  • Member
  • ***
    • Posts: 105
    • Karma: +20/-3
    • aurabin.net
Reply #21 on: November 10, 2019, 11:45:50 AM
Thank you ... great Job!



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #22 on: November 10, 2019, 12:36:24 PM
Thank you ... great Job!

No problem! MultiView for 64bit wasn't working correctly. In fact, in some cases it crashed the system. So I decided to fix the major issues and add some functions.

The next major goal after a few fixes is to focus on the ILBM datatype by adding Save Functions so that MultiView Save As IFF will also work as expected.

So what will be New in New MultiView? The most noticeable changes will be Save As IFF, Save As PNG and that About and Picture Information are now separate menu items. Image type detection especially for ILBM, HAM, EHB and standard 8bit will be updated. There is also a possibility of adding "DataTypes List" functions to MultiView and the ability to save a "DataTypes List" to file. It is interesting to note that you can open a picture such as ilbm that is less than 8bit and save as png. The picture will automatically be up-converted to save as 8bit png! That's nice.

Those are just a few updates. More may be added later to make MultiView more modern and more functional. These changes are being made with the goal of keeping compatibility with 32bit and other AROS  flavors such as AROS 68k.
« Last Edit: November 10, 2019, 01:05:17 PM by miker1264 »



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #23 on: November 10, 2019, 01:48:31 PM
good miker :D



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #24 on: November 29, 2019, 11:46:16 PM
Making a few minor changes to MultiView for 64bit to open and display picture files correctly.



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #25 on: November 30, 2019, 04:50:37 AM
I hope there's a version for x86 miker :D



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #26 on: November 30, 2019, 10:05:06 AM
It will be the same version for x86 and x64. I believe AROS 68k uses the same version also.

It was stable enough when working on 32bit. But MultiView itself is incomplete. If you open a pic and choose "Nomal" on the "Window" menu then you'll see what I mean by it being incomplete.

Though the 32bit version was stable the 64bit version was Very Unstable! When using "Open" on the Project Menu it would crash horribly by trying to force the new image into the existing window. There was a resource sharing error. So I solved that major issue by closing the window and then opening a new window with the new image. Nice.

Resizing with the resize gadget caused the same horrible crash. Also using FitToWindow and KeepAspect it would Maximize the image but it wouldn't size the window frame. So there would be a large gap on the right or bottom. That works now with a new Resize function but there are still some minor issues to fix and some improvement.

When I decided to add Save As PNG which works now I didn't know I would have to fix so many things! I thought MultiView was feature complete. I suspect that is true for many AROS components. They seem to work well until you look at it and test it. Then you will discover problems and inconsistencies. That accounts for some of the frustration that paolone and others have when trying to update old components for use with x64. It used to work on 32bit but it won't work on 64bit.



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #27 on: December 07, 2019, 06:47:37 AM
i understand miker



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #28 on: December 12, 2019, 11:39:31 AM
There are still some minor issues but I have fixed the main issues that caused MultiView to crash on 64bit. This is the version that I'll commit at the moment. I'll try to fix the other issues when I can.

I'll post the compiled 64bit version later today if anyone wants to test it out and compare the new one with the original. These changes only affect 64bit and 68k.

BTW MultiView can now Save As PNG. :-)



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #29 on: December 12, 2019, 03:12:44 PM
ok miker