Ability to crop an image
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56.1k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
Description
I suggest that the image() function should have a crop (or another name) argument that would crop the image. It could work a bit like the pad() function, for example
#image(
"figure.jpg",
crop: 5pt,
)
would crop the image by 5pt from each side.
Or maybe it could be a separate function, like so
#crop(
x: 5pt,
top: 2pt,
image("figure.jpg"),
)
Use Case
The ability to crop an image, or anything else, is useful on it's own, but when I'm writing a math paper and have a figure generated from python, the figures tend to have a white background spanning unnecessarily far. Im sure there will be other use cases tho
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the image() and pad() entry points and reading how their arguments affect rendered content. Determine how cropping should apply to image edges or other content, then establish the accepted API and verify that a cropped image matches the requested offsets. No specific files or tests are named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100