Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Requests: interlineSpace, kerning #79

Closed
reggi opened this issue Apr 26, 2023 · 4 comments
Closed

Feature Requests: interlineSpace, kerning #79

reggi opened this issue Apr 26, 2023 · 4 comments
Milestone

Comments

@reggi
Copy link

reggi commented Apr 26, 2023

I created a bunch of issues today in https://github.com/lumeland/imagemagick-deno that should have been added here.

lumeland/imagemagick-deno#5
lumeland/imagemagick-deno#4
lumeland/imagemagick-deno#3
lumeland/imagemagick-deno#2

My main question is it possible to just add string flags the same as you'd pass to the CLI, if not how can I use imagemagick's parentheses feature via this wasm implementation?

@reggi reggi changed the title Add Kerning Feature Requests: interlineSpace, kerning Apr 26, 2023
@dlemstra
Copy link
Owner

Next file feel free to create separate issues and discussions for this.

3/5: Unable to set font kerning / Unable to set font interlineSpace
In the next version of magick-wasm you will be able to set textKerning and textInterlineSpacing with the MagickSettings or MagickReadSettings.

4: Overload needed when using read with color, width, height, (for settings)
I will not add this overload because of how ImageMagick works internally. When you only specify the width the library will determine the height and the same will happen when you only specify the height.

2: Is there a way to pass in raw flags?
This library uses the API of ImageMagick that is called when the command line flags are parsed. And I will not provide an api to send command line options to some kind of api. And you don't really need the parentheses because of this api design. But feel free to start a new discussion when you need some help with translating a command line api to code..

@dlemstra dlemstra added this to the 0.0.21 milestone Apr 28, 2023
@reggi
Copy link
Author

reggi commented Jun 2, 2023

@dlemstra how " don't really need the parentheses because of this api design"? What if I need to process an image and pass that output without saving and reprocess it? 🙏

@reggi
Copy link
Author

reggi commented Jun 2, 2023

I have a rather complicated build command right now all build using the NPM library. With 3 nested parentheses.

I'd love some docs to understand how to do the same with your libary. @dlemstra 🙏

I will be doing some attempts today.

[
  './background-image.jpeg',
  '(',
  './artwork-background.png',
  '-fill',
  '#FFFFFF',
  '-font',
  './font.ttf',
  '-pointsize',
  '40.43905257076835',
  '-gravity',
  'Center',
  '-draw',
  'text 0,0.63 "galileo"',
  '(',
  './artwork-foreground.png',
  ')',
  '-composite',
  ')',
  '-gravity',
  'North',
  '-geometry',
  '+0+171.43',
  '-composite'
]

@reggi
Copy link
Author

reggi commented Jun 2, 2023

NVM @dlemstra I figured it out with the help of feeding chat gpt all the main exports and some types. Thanks for the great library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants