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...