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

Support for extent #150

Open
lilltiger opened this issue Oct 24, 2017 · 1 comment
Open

Support for extent #150

lilltiger opened this issue Oct 24, 2017 · 1 comment

Comments

@lilltiger
Copy link

Hi!

I need support for extent but I fail to get it to work :/

extent
composite image on background color canvas image.

gm("img.png").extent([width, height, options])

I tried to add:


if ( "extent" in this.options ) {
  const extentArgs = this.options.extent.match(cropSpec);
  const extentWidth = extentArgs[1];
  const extentHeight = extentArgs[2];
  img = img.extent(extentWidth, extentHeight);
}

to "lib/ImageResizer.js" just before the check for croping. And in the config i added:
"extent": "3000x3000",

Then I did:

make clean
make
npm run update

It compiles and I can run the script but the extent does not seem to be applied.
So I guess I am missing some important step?

@lilltiger
Copy link
Author

Guess something just went wrong when updating, as it seems to work with this code.

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

1 participant