You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to align multiple texts at their baselines. Some cursory experimentation with pyvips suggests that it might be possible to do this if yoffset was available.
Yes, this would make a useful enhancement as libvips calculates the top-left position but this is not yet exposed by sharp. A possible implementation might look something like the following:
// PROPOSED API - NOT YET AVAILABLEconst{ info }=awaitsharp({text: { ... }).toBuffer({resolveWithObject: true});const{textOffsetLeft, textOffsetTop }=info;
lovell
changed the title
Get vips xoffset/yoffset from image
Enhancement: return xoffset/yoffset when creating text image
Aug 29, 2023
Feature request
What are you trying to achieve?
I'm trying to align multiple texts at their baselines. Some cursory experimentation with pyvips suggests that it might be possible to do this if
yoffset
was available.In sharp it is not:
When you searched for similar feature requests, what did you find that might be related?
"yoffset" appeared in several issue but none were about
yoffset
.What would you expect the API to look like?
(await image.metadata()).yoffset
What alternatives have you considered?
-
Please provide sample image(s) that help explain this feature
-
The text was updated successfully, but these errors were encountered: