Repository navigation
Import: a picture on a transparent background keeps all of itself (#1199) - #1352
Merged
Merged
Conversation
…nmedia#1199) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PZgw7hpWq3uABHCn8iZMo
Owner
|
@plazmabokor thank you, merged and out in layerling 1.145.0: a logo on a transparent background now comes in whole. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discussion #1199: a logo on a transparent background - black text under a large light blue oval, mid-blue letters round it - came in as the oval and a few flecks of the letters, without the text.
Why: the import traces either the dark or the light part of a picture. On a transparent background it chose the part with more pixels (
pictureShapePart), here the light oval, so the black text and the mid-blue letters dropped out.The fix: on a transparent background the transparency already says what the picture is, so every pixel that is not transparent is now the shape, whatever its colour (
importedPictureTraceinpictureIcon.ts,byOpacityinrasterTrace.ts). On #1199's logo all the lettering comes in. An opaque picture is traced as before. The icon tag and the trace in sketch mode are unchanged; the icon tag keeps its Dark / Light choice.Tests:
tests/unit/pictureIcon.test.ts: the transparent edge is seen; a logo like #1199's (light oval, mid-blue letters, black text on transparency) keeps all nine outlines; black on white is traced as before. Run together with the other fix on main 1.134.0 (4d70503):npm test489 files, 4246 tests pass;npm run test:e2e99 files, 866 tests pass;tsc --noEmitis clean. Main has moved on since; the three code files here are untouched there, and only thedocs/CHANGELOG.mdline was moved onto the newest main.🤖 Generated with Claude Code
https://claude.ai/code/session_018PZgw7hpWq3uABHCn8iZMo