Image Trace API is broken
Please watch the video attached.
1. Rename the attached .txt. file to .js (UserVoice does not allow to attach scripts directly)
2. Select a raster image in Illustrator and try to run the script the way it’s shown in the video, with line 11 and 12 commented, mutually exclusive
With TRACINGFULLCOLOR on it is expected to have the 'Palette' dropdown switch to Full Tone, but it gets set to Limited.
On the contrary, TRACINGLIMITEDCOLOR should give Limited for 'Palette', but it gives Automatic.
These are obviously swapped.
Also notice how all advanced options become 50%.
-
A related bug report:
Action with Image Trace does not record preset selection
http://illustrator.uservoice.com/forums/601447/suggestions/48528176 -
William Campbell commented
The 2024 version of Illustrator has broken an ExtendScript solution I developed for a client that traces an image imported into a document then creates a cut and bleed layer. The tracingObject property "ignoreWhite" is now irrelevant and nothing has been updated in the ExtendScript API for the change to the tracing object properties. Please fix.
-
Sergey Osokin commented
In CC 2023 and CC 2024, "Ignore White" was replaced with "Ignore Color" in the trace preset, but Adobe engineers did not add the ability to control the boolean state of this checkbox and the color values in the color picker. Once again, the needs of users and independent developers who want to automate the design routine were ignored.
options.tracingMethod = TracingMethodType.TRACINGMETHODABUTTING;
options.ignoreWhite = true; // With v.27 / 28 it's a useless methodWhat changes have I found in plugin SDK versions, but not in ExtendScript?
Adobe Illustrator SDK CC 2022 file AIVectorize.h new lines:
/** Tracing option key for whether to ignore "color" background or not. Boolean. New for CS3. */
#define kTracingShouldIgnoreColorsKey "adobe/vectorize/output/shouldIgnoreColors"/** Tracing option key to store colors that have to be ignored from tracing option. Boolean. New for CS3. */
#define kTracingIgnoreColorsKey "adobe/vectorize/output/ignoreColors"#define kTracingIgnoreWhiteDefault (false)
Adobe Illustrator SDK CC 2024 file AIVectorize.h new lines:
constexpr AIRGBColor kTracingWhiteColor = { 65535, 65535, 65535 };
constexpr AIRGBColor kTracingIgnoreColorDefault = kTracingWhiteColor; -
Sergey Osokin commented
ExtendScript from a custom preset loads Colors: 100 instead of 10, and what appears white to the user at first is RGB 253,253,253,253, so the Ignore White checkbox in the preset doesn't work.
-
Sergey Osokin commented
Take a look at tracing-palette-bug.mp4. I am assuming that for the tracingColorTypeValue attribute, the TracingColorType.TRACINGFULLCOLOR and TracingColorType.TRACINGLIMITEDCOLOR keys work in reverse. And we can't set the palette color limits correctly.
Look at tracing-preset-bug.mp4. The script should load the default settings for tracing. But what we see, again like in the previous video, we have problems with the number of colors for the Palette. This could be tolerated when in CC 2019 the result after the script was like manually selecting a preset, but in CC 2023 and this is broken and users can't trust the automation of tracing.
I think the Adobe team needs to do a full SDK revision for ExtendScript on tracing methods and attributes.