Libvips cropping#16
Draft
tonytw1 wants to merge 79 commits into
Draft
Conversation
tonytw1
force-pushed
the
libvips-cropping
branch
from
August 2, 2025 10:20
0839933 to
e24ec6d
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
August 2, 2025 18:40
e24ec6d to
ced0d9e
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
August 2, 2025 20:30
ced0d9e to
96bd437
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
August 3, 2025 10:42
96bd437 to
0a3d157
Compare
tonytw1
force-pushed
the
libvips
branch
2 times, most recently
from
August 11, 2025 19:06
c8f8217 to
c96ff82
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
August 11, 2025 19:07
0a3d157 to
c23e630
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
September 21, 2025 20:16
c23e630 to
dba943e
Compare
tonytw1
force-pushed
the
libvips
branch
4 times, most recently
from
September 28, 2025 10:12
d296629 to
25c0148
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
2 times, most recently
from
September 28, 2025 11:22
5997767 to
7ced3c4
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
November 23, 2025 20:44
7ced3c4 to
3044f66
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
December 21, 2025 22:02
3d0a1be to
afcdb8a
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
6 times, most recently
from
December 30, 2025 11:08
c916363 to
dcd3779
Compare
… parameter for easier testing.
…decision based on no icc profile seen. Nice and clean; cribbed from vips thumbnail source code.
… without relying in strip on save. Leads to been able to set metadata on crops. If not removed, orientation will express itself on save if not removed even though it's not in a exif prefixed field.
…on reference into the XMP using IPTC metadata fields. Explicitly use compact XMP format. IPTC has moved from the app13 block into XMP.
… vips strip with keep for XMP feels safer.
…tiff with alpha correctly.
…or outputFilename.
Because the dimensions of the source image needed to calculate the scale are direct available on the source VImage dimensions.
…parallel. resizeImage is wrapped in a Future. Multi thread cropping will need a shared Arena.
…rendered; don't want to send partial sets.
…than indexed metadata for crop type decision. Makes this operation more self contained and fix forwardable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Cropping is implemented using libvips.
Aims to only load the image once.
The image processing operations happen in memory rather than forking out to shell commands.
Nudges the
Crops.cropTypecrop file type decision towards a more deterministic set of parameters.isGraphicdecision for crop type is inferred from the number of bands in the source image.Do not know how to implement this colour depth query in libvibs.
IPTC tagging
Moves to to the XMP block with the XMP block been built in memory.
Performance
Some marginal reductions on cropping time and predictable memory use.
These test images can be cropped by a container with 2Gb of memory.
Time for
"POST /cropsto return after making a fullset of 5:3 full frame crops of various test images.How should a reviewer test this change?
How can success be measured?
Who should look at this?
Tested? Documented?