mirror of
https://github.com/lovell/sharp.git
synced 2025-08-24 21:41:40 +02:00
Compare commits
No commits in common. "67462bee79e5924f56bd879703052ea4c52eb299" and "ecfc77c18504f8be58a8dca3060e0c195ecc2332" have entirely different histories.
67462bee79
...
ecfc77c185
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@ -169,7 +169,7 @@ jobs:
|
||||
path: npm/${{ matrix.platform }}
|
||||
retention-days: 1
|
||||
if-no-files-found: error
|
||||
build-linuxmusl-arm64:
|
||||
build-linuxmusl-arm-64:
|
||||
permissions:
|
||||
contents: read
|
||||
name: "build-linuxmusl-arm64 [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}"
|
||||
@ -177,8 +177,7 @@ jobs:
|
||||
container:
|
||||
image: ${{ matrix.container }}
|
||||
volumes:
|
||||
- /opt:/opt:rw,rshared
|
||||
- /opt:/__e/node20:ro,rshared
|
||||
- /:/host
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -192,10 +191,12 @@ jobs:
|
||||
- name: Allow Linux musl containers on ARM64 runners # https://github.com/actions/runner/issues/801#issuecomment-2394425757
|
||||
shell: sh
|
||||
run: |
|
||||
sed -i "/^ID=/s/alpine/NotpineForGHA/" /etc/os-release
|
||||
apk add nodejs --update-cache
|
||||
mkdir /opt/bin
|
||||
ln -s /usr/bin/node /opt/bin/node
|
||||
apk add nodejs
|
||||
sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release
|
||||
cd /host/home/runner/runners/*/externals/
|
||||
rm -rf node20/*
|
||||
mkdir node20/bin
|
||||
ln -s /usr/bin/node node20/bin/node
|
||||
- name: Dependencies
|
||||
run: apk add build-base git python3 font-noto --update-cache
|
||||
- uses: actions/checkout@v4
|
||||
@ -303,7 +304,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
needs:
|
||||
- build-native
|
||||
- build-linuxmusl-arm64
|
||||
- build-linuxmusl-arm-64
|
||||
- build-qemu
|
||||
- build-emscripten
|
||||
steps:
|
||||
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
title: v0.34.4 - TBD
|
||||
slug: changelog/v0.34.4
|
||||
---
|
||||
|
||||
* Ensure `autoOrient` removes existing metadata after shrink-on-load.
|
||||
[#4431](https://github.com/lovell/sharp/issues/4431)
|
@ -98,6 +98,7 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
if (baton->input->autoOrient) {
|
||||
// Rotate and flip image according to Exif orientation
|
||||
std::tie(autoRotation, autoFlip, autoFlop) = CalculateExifRotationAndFlip(sharp::ExifOrientation(image));
|
||||
image = sharp::RemoveExifOrientation(image);
|
||||
}
|
||||
|
||||
rotation = CalculateAngleRotation(baton->angle);
|
||||
@ -293,9 +294,6 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
throw vips::VError("Input SVG image exceeds 32767x32767 pixel limit");
|
||||
}
|
||||
}
|
||||
if (baton->input->autoOrient) {
|
||||
image = sharp::RemoveExifOrientation(image);
|
||||
}
|
||||
|
||||
// Any pre-shrinking may already have been done
|
||||
inputWidth = image.width();
|
||||
|
@ -322,6 +322,8 @@ describe('Raw pixel data', function () {
|
||||
.gif({ keepDuplicateFrames: true })
|
||||
.toBuffer();
|
||||
|
||||
console.log(await sharp(gif).metadata());
|
||||
|
||||
const { width, height, pages, delay } = await sharp(gif).metadata();
|
||||
assert.strictEqual(width, 1);
|
||||
assert.strictEqual(height, 1);
|
||||
|
@ -635,19 +635,6 @@ describe('Rotation', function () {
|
||||
assert.strictEqual(height, 6);
|
||||
});
|
||||
|
||||
it('Shrink-on-load with autoOrient', async () => {
|
||||
const data = await sharp(fixtures.inputJpgWithLandscapeExif6)
|
||||
.resize(8)
|
||||
.autoOrient()
|
||||
.avif({ effort: 0 })
|
||||
.toBuffer();
|
||||
|
||||
const { width, height, orientation } = await sharp(data).metadata();
|
||||
assert.strictEqual(width, 8);
|
||||
assert.strictEqual(height, 6);
|
||||
assert.strictEqual(orientation, undefined);
|
||||
});
|
||||
|
||||
it('Invalid autoOrient throws', () =>
|
||||
assert.throws(
|
||||
() => sharp({ autoOrient: 'fail' }),
|
||||
|
Loading…
x
Reference in New Issue
Block a user