Author Topic: AROS Picture DataTypes  (Read 1100 times)

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #30 on: September 16, 2019, 03:02:36 PM »
Did not follow the thread entirely, but the jpeg datatype could use an update, too. There are  some jpegs, which can' be loaded. AFAIR there are some on the jpeg pages.

That's correct. I've looked at the JPEG code. It can't Load or Save 8bit JPEG files, though 8bit files do exist. Some websites especially use 8bit JPEG files to store images such a cartoon site. I think it's called AlphaLuna?

Just some minor revisions might allow the datatype to Load 8bit as well as 24bit JPEG. But first I would like to finish BMPX and ILBM.

After all that I can add Save Functions for TGA and PCX if needed and start writing TIFF. I'd also like to have a Mac ICNS datatype for a future Icon Viewer that's for ICO, ICNS, INFO.

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #31 on: September 16, 2019, 03:21:08 PM »
In order to finish the new BMPX picture datatype I'm working on the Padding Bytes added to the end of scanlines for images with odd dimensions. I've already spent about 30 hours on the datatype.

For images that are evenly divisible (modulus) then saving 8bit, 24bit nd 32bit BMP can already do that. I'll finish the last bits and clean up the code to make it prettier and well commented in the next few days. Then I can release it for you.

Next will come ILBM. Although I have the Save Functions for ILBM working it will take about two weeks to put them in the picture datatype.

salvatore

  • Guest
Re: AROS Picture DataTypes
« Reply #32 on: September 16, 2019, 03:56:29 PM »
thank you miker :D

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #33 on: September 16, 2019, 04:29:40 PM »
thank you miker :D

You're welcome! It's my pleasure to serve the AROS community in any small way possible.

Fixing up the picture datatypes and writing new ones has been on my priority list for a long time. Now that I have the tools to do it things may progress very quickly!

It is my hope that someday MultiView will be enabled to "Save As IFF" and "Save As PNG".

salvatore

  • Guest
Re: AROS Picture DataTypes
« Reply #34 on: September 16, 2019, 05:48:31 PM »
good miker ;)

asymetrix

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: AROS Picture DataTypes
« Reply #35 on: September 16, 2019, 10:42:15 PM »

In future I hope Multiview converts to PDF/ASCIIDOC or other document archiving format.

Improved datatypes : leading a way forward for image/media processing frame server.

Apple is using their high performance HEIF file format.

https://nokiatech.github.io/heif/examples.html

https://github.com/strukturag/libheif

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #36 on: September 17, 2019, 12:10:33 AM »
One reason why we don't have more datatypes is that there are many programmers out there for AROS but very few know how to write a datatype. Those that do know are probably too busy doing other projects. And some of the datatypes we have don't have sufficient documents for usage.

The type of datatype is only limited by one's own imagination and creativity. Do we have a PDF datatype yet?

salvatore

  • Guest
Re: AROS Picture DataTypes
« Reply #37 on: September 17, 2019, 12:34:29 AM »
no miker

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #38 on: September 17, 2019, 01:42:50 AM »
no miker

No what? My assessment is wrong?

Samurai_Crow

  • Newbie
  • *
  • Posts: 45
  • Karma: +0/-0
  • Hobby coder
Re: AROS Picture DataTypes
« Reply #39 on: September 17, 2019, 04:04:37 AM »
no miker

No what? My assessment is wrong?
No PDF datatype yet.  That may come with Ghostscript and Terminills' attempt at bringing AROS' print drivers up-to-date.

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #40 on: September 17, 2019, 04:35:35 AM »
no miker

No what? My assessment is wrong?
No PDF datatype yet.  That may come with Ghostscript and Terminills' attempt at bringing AROS' print drivers up-to-date.

Ah! I understand. I'd be interested to see how the PDF datatype works.
I mostly work with graphics programs, file systems and disk imaging.

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #41 on: September 17, 2019, 04:42:42 AM »
Still working on the BMPX datatype.

In theory at least the BMPX 32bit file is BGRA so it should display as Transparent.

In fact, I used a gold crown with a transparent background to test BMPX + Alpha.
I started with a transparent PNG (alpha mask), then saved as BMPX using PixelFormer 'Export As'.
In the Save Dialog I specified 'RGBA' but when I opened it with ShowPicture using datatypes the
background is not transparent. It's Black! But I reopen the same file in PixelFormer and it works!

Something must be wrong with my method for displaying the image! The format is RGBA but I'm
using Cybergraphx function 'WritePixelArrayAlpha' which expects RECTFMT_ARGB. Maybe that's it?


Yannick

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
Re: AROS Picture DataTypes
« Reply #42 on: September 17, 2019, 08:58:11 AM »
As your colors are OK it seems that the endianess is OK.
In order to get a "background" for the alpha channel you first need to draw it yourself in the application, datatypes are not doing this.

Try opening the image in ZunePaint, it is using datatypes and draws a checkered background.

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #43 on: September 17, 2019, 01:54:13 PM »
As your colors are OK it seems that the endianess is OK.
In order to get a "background" for the alpha channel you first need to draw it yourself in the application, datatypes are not doing this.

Try opening the image in ZunePaint, it is using datatypes and draws a checkered background.

Thank you. Good idea.

Zune Paint shows a checkered background for the orginal png but still black for the bmpx.
But the good news is that displaying 32bit bmpx without an alpha mask works very well.

Because of time constraints I may have to try to solve the bmpx alpha display issue later.
Padding Bytes works on nearly all images except a few. My formula for testing Modulus
probably needs adjusted. That's easy enough to resolve. I should have it ready tomorrow.

The bmpx datatype can Load 1bit, 4bit, 8bit, 24bit, and 32bit bmp files. It can Save 8bit,
24bit, and 32bit bmp's. In a future update I plan to also include OS/2 bitmap file support.
« Last Edit: September 17, 2019, 02:03:24 PM by miker1264 »

miker1264

  • Senior Member
  • ****
  • Posts: 262
  • Karma: +11/-1
Re: AROS Picture DataTypes
« Reply #44 on: September 17, 2019, 02:24:24 PM »
Using ZunePaint to test BMPX datatype.

I like how it scales the image to fit the screen.