AROS ABIv0 20180415 Development

deadwood · 17695

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #30 on: April 02, 2021, 11:43:10 AM
@deadwood

I found this information while searching for Morph OS PDTA_WhichPicture. It is part of a news article from AmigaNews.de from 2012 about WarpTIFF Datatype. So it seems both Amiga OS and Morph OS both use PDTA_WhichPicture and PDTA_GetNumPictures. Now AROS does as well.

"Oliver Roberts released version 44.2 of his WarpTIFF datatype, which runs on both 68k and PPC Amigas under WarpOS and MorphOS.

Changes since prior version:
New: Multi image TIFF files support. Applications can select the picture to be displayed via PDTA_GetNumPictures- and PDTA_WhichPicture tags."



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #31 on: April 02, 2021, 12:28:43 PM
@deadwood

As for my TIFF Datatype it works well enough with Viewer Apps that get standard datatype objects to draw into a window rport.

But MultiView uses datatypes as gadgets that get added to the window gadget list to display images. That's a different method.

Immediately after a restart double-click on a tiff image causes MultiView to fail at TIFFOpen with "File Not Found" yet the filename is valid. When a Viewer App has a TIFF file open then MultiView can open tiff images with double-click. No problem.

Not sure about WarpTiff but AK-Tiff Datatype claims that when Tiff Lib fails then an Internal Decoder opens the image.

So maybe that is the direction I should go to develop an internal decoder. I'll give it a try.  :)



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #32 on: April 10, 2021, 01:22:50 AM
@deadwood

I found this information while searching for Morph OS PDTA_WhichPicture. It is part of a news article from AmigaNews.de from 2012 about WarpTIFF Datatype. So it seems both Amiga OS and Morph OS both use PDTA_WhichPicture and PDTA_GetNumPictures. Now AROS does as well.

"Oliver Roberts released version 44.2 of his WarpTIFF datatype, which runs on both 68k and PPC Amigas under WarpOS and MorphOS.

Changes since prior version:
New: Multi image TIFF files support. Applications can select the picture to be displayed via PDTA_GetNumPictures- and PDTA_WhichPicture tags."

Thanks for explanation. Quick question: since those tags are already existing on other platforms, have you checked that IDs of these tags for AROS match the IDs on other platforms?



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #33 on: April 10, 2021, 02:19:13 AM
@deadwood

I'm not sure how to go about checking the tag ID's on AROS. How would I verify what tag ID's Amiga OS4 or Morph OS is using?



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #34 on: April 10, 2021, 12:37:03 PM
These should be published in MorphOS/AmigaOS4 SDKs - in the header files.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #35 on: April 10, 2021, 06:03:36 PM
@deadwood

I located and downloaded the sdk's for Amiga OS 4.1 and Morph OS. I located the tag ID's for Picture Datatype in Compiler/includes/datatypes. Now I will compare information to get a definite answer for you.

There have been several changes for our Picture Datatype over the last two years. The current version is 41.6 and the version in Alt-ABIv0 is 41.3 so I will grab the complete v41.6 files and compile using PDtype Creation Tool. I wanted to test it on Icaros 2.2.8 to see if it's compatible as is or if I have to update ea file.

I'm also working on some Enhancements and Updates for Luna Paint. I'm adding support for New Datatypes, BitDepth Conversion, and Color Quantizing. I'd also like to add Save ILBM Image functions for ILBM, HAM6, HAM8. Some New Graphics Effects might also be nice.

Busy, busy.  :)
« Last Edit: April 10, 2021, 06:11:12 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #36 on: April 10, 2021, 09:27:20 PM
@deadwood

I have the answer hopefully.

The sdk's for Amiga OS4 & Morph OS were not helpful as far as includes for datatypes.

Then I remembered that the Developer CD I bought for OS3.5 NDK had lots about datatypes.

Rather than dig out my Developer CD I did a quick search. Instead I found a downloadable version of the Amiga OS 3.9 NDK. Inside I found the goods!

Our AROS tag ID's end at 218. So the two new items would be 219 for PDTA_WhichPicture & 220 for PDTA_GetNumPictures. :-)

So I need to add two defines for Pictureclass.h that goes in Compiler/includes/datatypes.

I would surmise that Amiga OS4 is very much the same as OS 3.9 and Morph OS as well. But I will try to verify it 100%.

The screenshot is from the Amiga OS 3.9 SDK.

Thank you for alerting me to the fact that I needed to check the tag ID's for the new methods.

In the future, when I get to it I'll have a few questions about AHI sound. I would be quite content as far as AROS programming to stay in my preferred niche of Graphics dealing with Images and Icons and Graphics Apps. But it seems AROS has other ideas! I'm constantly being drawn in several different directions. But it's all fun! No worries.
« Last Edit: April 10, 2021, 09:34:53 PM by miker1264 »



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #37 on: April 10, 2021, 11:43:18 PM
Thanks for checking. Indeed, we always need to check IDs of functions/attributes for compatibility. I also looked into pictureclass.h and it looks like someone added the necessary defines with correct values already :)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #38 on: April 11, 2021, 10:20:02 AM
Thank you sir. I appreciate you looking at the include file.

If you have grabbed the newest version 41.6 files for picture.datatype and compiled it while looking at the header file, I would be glad to test it for you on Icaros 2.2.8 for compatibility ;-)

I would have to use PDType Creation Tool to build a 32bit binary. I have already tried and failed to compile it using the PDType Creation Tool. It said "missing symbols" in pictureclass.c file.
« Last Edit: April 12, 2021, 11:17:38 AM by miker1264 »



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #39 on: April 13, 2021, 05:10:21 AM
@miker1264

I started moving your patches to my repository. How should I test if new functionality works?



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #40 on: April 13, 2021, 07:59:50 AM
I can help test the datatype for you.

But also open any 8bit image or ILBM image with 8bitplanes or less in MultiView. Then from the menu select Save As IFF.  It also works with 24bit ILBM images.

To test the two new methods I use a modified INFO datatype.

Here are some images for testing. Open in MultiView and Save As IFF. They should be identical.




deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #41 on: April 13, 2021, 10:49:05 AM
I opened each image in MultiView and did Save as IFF. Then opened each saved image in MultiView. They look the same however the sizes are different. Source images are between 23 and 35 kB, while each saved image is 40.2 kB.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #42 on: April 13, 2021, 12:12:28 PM
@miker1264

I noticed you are using <tab> for tab. Please change your editor settigs to use 4 spaces - this is AROS source code standard. There are also unused variables - I will delete those not to have warnings/errors.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #43 on: April 13, 2021, 01:13:22 PM
Published new build (first post) 20180415-2 containing changes to picture.datatype. Please test.



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #44 on: April 13, 2021, 01:30:59 PM
ok deadwood :)