Skip to content

ext-sharp: sharp({ create: {...} }) throws 'Invalid sharp handle' #8748

Description

@proggeramlug

Env: perry 0.5.1512 built from main@6173ff9f6, macOS arm64. MB24 Phase-0 spike.

Repro:

import sharp from "sharp";
const buf = await sharp({ create: { width: 4, height: 4, channels: 3,
  background: { r: 1, g: 2, b: 3 } } }).png().toBuffer();

Actual: throws the plain string "Invalid sharp handle" (typeof "string"). typeof sharp is "object" (Node: "function", callable either way here).

Expected: sharp's create input (blank canvas) — the standard building block for watermark overlays and placeholder images.

Impact/context: buffer- and file-based inputs untested beyond this (the create path is the first op in our pipeline test). ext-sharp being viable end-to-end (create + resize + composite + metadata/EXIF strip) decides whether MB24 uses sharp or shells out to the vips CLI (which works fine under Perry today, verified on Linux CI). Full test: mobilitybroker24/monorepo spike/tests/11-image-sharp.ts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions