Welcome, Guest. Please login or register.

Author Topic: Os 3.1.4 - List of bug fixes and changes by component  (Read 85666 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline mschulz

Re: Os 3.1.4 - List of bug fixes and changes by component
« on: November 01, 2018, 01:51:07 PM »
Quote
Your requested feature would require that a datatype "adopts" the bitmap of another datatype, and then save that. Not sure whether this is available, but it is at least not one of the initial requirements of datatypes.

You could just adopt an enhancement from AROS. When you create new datatype object you may explicitly specify the DTA_BaseName tag in order to select proper class. This way one could use datatypes to e.g. load a picture from disk, create new datatype object with specified class (e.g. { DTA_BaseName, (ULONG)"png" }), transfer data between them (PDTM_READPIXELARRAY/PDTM_WRITEPIXELARRAY) and finally write new datatype object (DTM_WRITE). Dunno if picture.datatype from 3.1.4 support this.

Example of use (writing picture datatype object as PNG) can be found in AROS sources, e.g. in my mirror: https://github.com/michalsc/AROS/blob/master/workbench/tools/ScreenGrabber/main.c