Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: mschulz on December 09, 2004, 02:48:12 PM

Title: Creating datatype object of specified subclass
Post by: mschulz on December 09, 2004, 02:48:12 PM
In order to create a jpeg datatype object (jpeg subclass of picture class) I do following under AROS:

DTImage = NewDTObject(NULL,
DTA_SourceType, DTST_RAM,
DTA_BaseName, "jpeg",
PDTA_DestMode, PMODE_V43,
TAG_DONE);

which is compatible with datatypes.library V45 written by Roland Mainz.

How can you do the same on both MorphOS and OS4? I need to create empty object, draw into it and write in specified format. All using datatypes.library.

regards,
Michal.
Title: Re: Creating datatype object of specified subclass
Post by: miksuh on December 09, 2004, 05:42:18 PM
WOW! This is exactly one piece of information I was looking for :) I didn't know how you can create new empty datatype object with type of jpg :)

I also have tried to find a way to save bitmap as a jpg or png file (AmigaOS3.9). One solution would be to use libpng, but if you can do that using datatypes then it would be great.

Could you please show me how you do that save feature using datatypes so that it works ? that would be great help, because I have never done anything like that before.

I know that not all datatypes seem to have write support thouugh, so maybe libpng would be better choise...