Hello,
I have taken this library in use and it seems to be working well, however I am trying to simply strip all properties from the EXIF data of an image with the args:
However this produces a warning printed to stderr:
Warning: ICC_Profile deleted. Image colors may be affected - <file_name>
This library currently treats anything logged to stderr as an errored state, and does not return the data as expected. Programs usually also print stuff such as progress and warnings to stderr. A better solution would probably be to treat exit code 0 as success, and exit code != 0 as error, and maybe also return stderr in the response.
This is the part that needs the change:
|
if (stderrContent && stderrContent.trim()) { |
|
return { |
|
success: false, |
|
data: undefined, |
|
error: stderrContent, |
|
exitCode: 0, |
|
}; |
|
} |
I'm happy to work on submitting a PR for this!
Hello,
I have taken this library in use and it seems to be working well, however I am trying to simply strip all properties from the EXIF data of an image with the args:
However this produces a warning printed to stderr:
This library currently treats anything logged to stderr as an errored state, and does not return the data as expected. Programs usually also print stuff such as progress and warnings to stderr. A better solution would probably be to treat exit code 0 as success, and exit code != 0 as error, and maybe also return stderr in the response.
This is the part that needs the change:
exiftool/src/index.ts
Lines 241 to 248 in 2578540
I'm happy to work on submitting a PR for this!