Welcome, Guest. Please login or register.

Author Topic: A first for OS4?  (Read 5758 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline chrisTopic starter

Re: A first for OS4?
« Reply #14 on: October 02, 2010, 09:09:26 PM »
Quote from: Piru;582655
Quite clearly it was about the WebP in particular. Indeed it isn't a first.


Hence the question mark.

Of course, the routines are available for Linux, but beyond the example webpconv file converter, what can you actually do with WebP on Linux?  Does anything else support it?

With this datatype you can actually use WebP files under AmigaOS just like any other image file format, without the need to convert the files back to something else first in a manual process.

I've just written the code for NetSurf for WebP too, so at least one web browser will shortly be supporting it.  Whether WebP takes off... well, we'll see.  With Google behind it, it just might.

As for JPEG2000, there are some incredibly high quality NASA charts in JPEG2000 format, the lower quality ones are JPEG.  It may not have much of a foothold, but there are JPEG2000 images out there in the wild - unlike MNG/JNG.

It takes a long time for a new graphics format to gain a following, I was using PNG for years (on my website too) before the main browsers started supporting it properly, and got lamented for it.  Now everybody uses PNG.  You have to start somewhere.  I'd rather release this now and show that AmigaOS is still up-to-date, than wait five years for the forums to be full of "why can't I view this image, it's in WebP format?".

Besides, it was quick and easy to do, I've probably wasted more time explaining myself than actually writing code.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline chrisTopic starter

Re: A first for OS4?
« Reply #15 on: October 02, 2010, 09:13:01 PM »
Quote from: lionstorm;582659
thanks !

any chance you would do more datatypes like ogg ? we have mp3, flac and wave but no ogg datatype (I usually encode my CDs in ogg with ADripper).


You might want to direct that question towards Fredrik (salass00), he's more of a whizz on the audio datatypes than me (given that I've never written one).
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: A first for OS4?
« Reply #16 on: October 02, 2010, 10:41:54 PM »
The day datatypes become bidirectional, I'll be a happy man :)
int p; // A
 

Offline chrisTopic starter

Re: A first for OS4?
« Reply #17 on: October 02, 2010, 11:06:05 PM »
Quote from: Karlos;582672
The day datatypes become bidirectional, I'll be a happy man :)


They already are, but hardly anything supports the save function, so it's rare for datatypes to implement it (this one doesn't, although I suspect it's about two lines of code so I can add it if you have a need for it?)
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: A first for OS4?
« Reply #18 on: October 02, 2010, 11:16:52 PM »
Quote from: chris;582676
They already are, but hardly anything supports the save function, so it's rare for datatypes to implement it (this one doesn't, although I suspect it's about two lines of code so I can add it if you have a need for it?)


By bidirectional I mean saving in the same format the datatype decodes, that is to say, every datatype subclass as a codec. Every time I've saved a datatype, I've got an IFF file.

Ideally, one would be able to get a list of available subclasses from the parent class. You could then pick one and ask the datatype system to export data in that format.
int p; // A
 

Offline chrisTopic starter

Re: A first for OS4?
« Reply #19 on: October 02, 2010, 11:38:30 PM »
Quote from: Karlos;582677
By bidirectional I mean saving in the same format the datatype decodes, that is to say, every datatype subclass as a codec. Every time I've saved a datatype, I've got an IFF file.


Yes, that's what I was talking about.  The datatypes system is perfectly capable of doing this (although MultiView's support is a bit rubbish - I think it always writes in IFF, it should be asking), however most subclasses just forward DTM_WRITE to the superclass - ie. you end up with an IFF file.  There is a little program on Aminet which converts between formats using datatypes, but I can't find it at the moment.

Because there's next to no software which uses the function, the majority of datatypes don't implement it.

edit http://aminet.net/package/util/conv/DTConvert018
Doesn't support v43 picture datatype interface, although source is available so that could be fixed.
« Last Edit: October 02, 2010, 11:42:25 PM by chris »
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: A first for OS4?
« Reply #20 on: October 02, 2010, 11:41:26 PM »
Quote from: chris;582682
Because there's next to no software which uses the function, the majority of datatypes don't implement it.


Chicken v Egg ?
int p; // A
 

Offline chrisTopic starter

Re: A first for OS4?
« Reply #21 on: October 03, 2010, 12:03:30 AM »
Quote from: Karlos;582684
Chicken v Egg ?


Yep.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: A first for OS4?
« Reply #22 on: October 03, 2010, 12:34:42 AM »
Quote from: chris;582661
I've just written the code for NetSurf for WebP too, so at least one web browser will shortly be supporting it.
It's nice to have other browsers than just WebKit based ones supporting it.
"While WebP images can’t be viewed until browsers support the format, we are developing a patch for WebKit to provide native support for WebP in an upcoming release of Google Chrome."

Quote
It takes a long time for a new graphics format to gain a following, I was using PNG for years (on my website too) before the main browsers started supporting it properly, and got lamented for it.  Now everybody uses PNG.  You have to start somewhere.  I'd rather release this now and show that AmigaOS is still up-to-date, than wait five years for the forums to be full of "why can't I view this image, it's in WebP format?".
WebP is still evolving as far as I can tell, so I think I'll rather wait and see if any need for it will arise before bothering too much with it.

Then again I'd indeed be just 30 mins of work to get it going as datatype... so why not.

As for being up-to-date, there are still some very basic core features missing/incomplete in the OS4. As long as you're not able to use basic things such as USB2 or flash it's quite hard to appear modern. 3D support is quite poor, too.
« Last Edit: October 03, 2010, 12:49:26 AM by Piru »
 

Offline kolla

Re: A first for OS4?
« Reply #23 on: October 03, 2010, 12:59:51 AM »
Quote from: chris;582682
Because there's next to no software which uses the function, the majority of datatypes don't implement it.

Hm, doesn't PPaint support this?
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: A first for OS4?
« Reply #24 on: October 03, 2010, 02:31:34 AM »
Quote from: kolla;582694
Hm, doesn't PPaint support this?

Reading through some example source and documentation it seems that writing images in indexed modes works through V42 datatype calls. Not sure if the feature is supported for RGB images as of V43, which may explain why it went un-developed since?

Whatever the reasons, it's stupidly overdue.
int p; // A
 

Offline chrisTopic starter

Re: A first for OS4?
« Reply #25 on: October 03, 2010, 11:17:53 AM »
Quote from: Karlos;582702
Reading through some example source and documentation it seems that writing images in indexed modes works through V42 datatype calls. Not sure if the feature is supported for RGB images as of V43, which may explain why it went un-developed since?


It must be supported for v43, as IFF saves work in 24/32-bit.

It's only a case of using PDTM_READPIXELARRAY to get the data and then writing it out to disk in the right format.

It would be a good start if MultiView allowed selection of the save format.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline krashan

  • Full Member
  • ***
  • Join Date: Jan 2003
  • Posts: 247
  • Country: pl
  • Thanked: 1 times
  • Gender: Male
  • Hardware designer and programmer
    • Show only replies by krashan
    • Personal homepage
Re: A first for OS4?
« Reply #26 on: October 03, 2010, 01:17:28 PM »
Quote from: Karlos;582672
The day datatypes become bidirectional, I'll be a happy man :)

Reggae (MorphOS "Datatypes NG") will be bidirectional in a few coming months, API for this is being worked out. Of course not all codecs automagically, but the first steps in this direction are done already. Then I may consider implementing WebP decoder and encoder, but in my opinion it is too  early as the "standard" is now defined in terms of early beta source code (instead of solid documentation) and poorly adopted in the IT world. Also remembering the story of failed JPEG2000 and failed JPEG XR hints to take some distance. While being the first is good from marketing point of view, it does not add much real functionality, and functionality is what MorphOS development is focused on.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: A first for OS4?
« Reply #27 on: October 03, 2010, 03:00:06 PM »
I thought reggae was more for streaming (sound/video) datatypes than static content?
int p; // A
 

Offline Fab

  • Full Member
  • ***
  • Join Date: Jun 2009
  • Posts: 217
    • Show only replies by Fab
Re: A first for OS4?
« Reply #28 on: October 03, 2010, 05:15:18 PM »
WebP is small fry... OWB for MorphOS supports WebM since about 3 months. :)

/me runs
 

Offline krashan

  • Full Member
  • ***
  • Join Date: Jan 2003
  • Posts: 247
  • Country: pl
  • Thanked: 1 times
  • Gender: Male
  • Hardware designer and programmer
    • Show only replies by krashan
    • Personal homepage
Re: A first for OS4?
« Reply #29 from previous page: October 03, 2010, 06:08:28 PM »
Quote from: Karlos;582754
I thought reggae was more for streaming (sound/video) datatypes than static content?

Reggae uses the same concept of static image as WebP ;-). Static image is just a video with a single frame inside. In fact it supports more than 10 image formats, while video framework is still not finished... Lack of free time sucks :-/.