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

tile() with background color #1923

Closed
neave opened this issue Oct 18, 2019 · 3 comments
Closed

tile() with background color #1923

neave opened this issue Oct 18, 2019 · 3 comments

Comments

@neave
Copy link
Contributor

neave commented Oct 18, 2019

libvips dszave provides a background option to set the default background color of the tiles, but this option does not seem to work in sharp. Am I doing this incorrectly or is this option not implemented?

Example:

sharp('file.png')
	.tile({
		size: 512,
		overlap: 0,
		layout: 'google',
		background: '#000'
	})
	.toFile(tilesDirectory, (error, info) => {
		done();
	});
@neave neave added the question label Oct 18, 2019
@lovell
Copy link
Owner

lovell commented Oct 18, 2019

Hi, as you've seen, the background option of libvips' dzsave operation is not currently exposed in sharp.

https://sharp.pixelplumbing.com/en/stable/api-output/#tile

Happy to accept a PR to add this if you're able.

@neave
Copy link
Contributor Author

neave commented Oct 18, 2019

OK thanks @lovell. I've had a go but C++ isn't my strong suit. See PR #1924.

@lovell lovell added this to the v0.23.2 milestone Oct 25, 2019
@lovell
Copy link
Owner

lovell commented Oct 28, 2019

v0.23.2 now available, thanks for the PR!

@lovell lovell closed this as completed Oct 28, 2019
Repository owner deleted a comment Nov 29, 2019
Repository owner deleted a comment Nov 29, 2019
Repository owner deleted a comment Nov 29, 2019
Repository owner locked and limited conversation to collaborators Nov 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants