Пример
Enforce and disable input pixel limits in sharp using limitInputPixels
sha256:19c7c30505f7037d3f6bfb3b1b66581f6ba1c8948a85a1750a1213786446ba49
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- node
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- node
- Язык
- node
- Менеджер пакетов
- npm
Среды запусков проверки
- Контекст выполнения
- node 22
- Операционная система
- linux alpine · musl
- Архитектура
- x64
- Среда выполнения
- node 22
- Язык
- javascript
- Менеджер пакетов
- npm
- Выполнение
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Кейс
- Цель
- Enforce and disable input pixel limits in sharp using limitInputPixels HOW
- Пакеты
-
sharp 0.33.5
- Окружение
- node
- Создан
- 2026-08-17T14:05:27Z
Что обычно предполагают
Passing null or a negative integer disables the input pixel limit, and exceeding it silently scales down the image.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- sharp rejects processing with 'Input image exceeds pixel limit' when pixel dimensions exceed limitInputPixels, and removing the limit requires 0 or false because null preserves the default 268402689 limit and negative integers throw a synchronous validation error.
- sharp processes images within the configured limitInputPixels threshold.
- limitInputPixels: false and limitInputPixels: 0 remove the limit and permit processing images exceeding previous bounds.
- limitInputPixels: null is ignored and leaves the default limit of 268402689 active.
- limitInputPixels: true resets the limit to the default 268402689.
- negative numbers or non-integer values throw a synchronous Error requiring a positive integer.
Файлы
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9