up till now DTConv commandline app could convert any supported picture type to all picture datatypes except the newer ones - TGA, PCX, TIFF & WEBP.
But...I concluded that the problem was the return type for OM_NEW for TGA & PCX. As a test I changed the return type for PCX to match the others...
And now DTConv can convert to 8bit PCX. So I assume the same modification will work for TGA. PCX wasn't returning the Datatype Object correctly.
IPTR PCX__OM_NEW(Class *cl, Object *o, Msg msg)
{
Object *newobj;
D(bug("[bmp.datatype] %s()\n", __func__));
newobj = (Object *)DoSuperMethodA(cl, o, msg);
if (newobj)
{
if (!GetPCX(cl, newobj))
{
CoerceMethod(cl, newobj, OM_DISPOSE);
newobj = NULL;
}
}
return (IPTR)newobj;
}
Oh. I need to change the D(bug) text also.
