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

Add some functions #464

Merged
merged 4 commits into from
Feb 27, 2025
Merged

Conversation

Flash-nDie
Copy link
Contributor

Hello.

PR Description

This PR adds several functions corresponding to the libvips C API.

Added Functions

  • func (r *ImageRef) Background() ([]float64, error) : Retrieves the background colors.
  • func (r *ImageRef) Subtract(in2 *ImageRef) error : Performs image subtraction.
  • func (r *ImageRef) Abs() error : Applies the absolute value operation.
  • func (r *ImageRef) Project() (*ImageRef, *ImageRef, error): Executes the project operation.

Modified Function

The text() function has been revised:

  • The original implementation is no longer used.
  • Since text() belongs to the create operations, it has been moved to create.c.
  • func Text(params *TextParams) (*ImageRef, error) : Create text image.

@tonimelisma tonimelisma merged commit 0d82957 into davidbyttow:master Feb 27, 2025
1 check failed
@tonimelisma
Copy link
Collaborator

Thank you so much @Flash-nDie!

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

Successfully merging this pull request may close these issues.

2 participants