New MultiView

miker1264 · 974

miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #15 on: October 24, 2019, 03:18:19 AM
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
  • Senior Member
  • *****
    • Posts: 294
    • Karma: +3/-0
Reply #16 on: October 24, 2019, 05:04:43 PM
Great!


miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #17 on: October 24, 2019, 06:40:11 PM
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, 07:56:24 AM by miker1264 »



miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #18 on: October 25, 2019, 07: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, 08:13:14 AM by miker1264 »



miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #19 on: October 27, 2019, 04:10:19 AM
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, 06:20:10 PM by miker1264 »



miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #20 on: November 10, 2019, 06:17:28 PM
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

  • Newbie
  • *
    • Posts: 32
    • Karma: +1/-2
    • aurabin.net
Reply #21 on: November 10, 2019, 06:45:50 PM
Thank you ... great Job!



miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #22 on: November 10, 2019, 07: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, 08:05:17 PM by miker1264 »



salvo

  • Member
  • ***
    • Posts: 200
    • Karma: +0/-0
  • Invalid Civil
Reply #23 on: November 10, 2019, 08:48:31 PM
good miker :D

Icaros on HP Z600 Intel Xeon X5570 3 Ghz, Nvidia 8400gs
Support
https://www.actionaid.it/
https://www.amref.it/


miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #24 on: November 30, 2019, 06:46:16 AM
Making a few minor changes to MultiView for 64bit to open and display picture files correctly.



salvo

  • Member
  • ***
    • Posts: 200
    • Karma: +0/-0
  • Invalid Civil
Reply #25 on: November 30, 2019, 11:50:37 AM
I hope there's a version for x86 miker :D

Icaros on HP Z600 Intel Xeon X5570 3 Ghz, Nvidia 8400gs
Support
https://www.actionaid.it/
https://www.amref.it/


miker1264

  • Senior Member
  • ****
    • Posts: 333
    • Karma: +12/-1
Reply #26 on: November 30, 2019, 05:05:06 PM
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.