We currently switched to AI 2018 and use the current SDK (CC2018). While trying to export a layer
as a PNG the "LinkDataFilter" method from the AIDataFilter suite fails with kDataFilterError
("DFER") for no understandable reason. This is on Windows 7, VS2017. Note that this worked
fine with earlier versions of the SDK and Visual Studio. It also works without problems on MacOS.
As I understand it the "creator" and "type" Arguments to "NewFileDataFilter" are MacOS
specific, so I assume that those have nothing to do with the actual problem.
Has someone experienced a similar problem? Could this be a problem with the SDK?
Any hints on what we could try out? Here the code:
AIDataFilter *filter = 0, *dstfilter = 0;
err = sAIDataFilter->NewFileDataFilter(path, "write", 'prw', 'PNGf', &filter);
if(err) return err;
err = sAIDataFilter->LinkDataFilter(dstfilter, filter);
if(err) return err; // <-- this fails with err == 'DFER'
Any help would be much appreciated.
The problem is fixed.
The LinkDataFilter function fails with err = 'DFER' because of the '/' separators in the path variable (1st argument to NewFileDataFilter function).
It works after I have the '/' separators converted to separators that are appropriate for the underlaying operating system.
On Windows "c:/temp/1.png" must be converted to "c:\temp\1.png".