CartVisualCreate account

Why does Pixelcut ignore margins unless crop is true, and does margin_right replace or add to the general margin?

Pixelcut's margin and directional-margin fields apply only when `crop` is true. If `crop` remains false, changing `margin` or `margin_right` is not a documented way to reframe the original canvas. With cropping enabled, `margin_right` replaces the general margin on the right; it is not added to it. Choose the crop state first, then calculate the effective spacing for each side.

Published · By CartVisual editorial team

Make cropping a prerequisite for margin controls

Pixelcut Remove Background has two framing states. By default, crop is false. When enabled, cropping uses the detected subject as its region of interest.

The endpoint's general margin and directional fields are documented as conditional on crop: true. This means the request crop: false, margin: "100px" should not be interpreted as a supported instruction to add 100 pixels around an unchanged source canvas.

Choose the canvas contract first. If the submitted composition and surrounding space must remain as they are, keep crop disabled and do not rely on margin fields. If the deliverable should be reframed around the detected subject, enable crop and then specify spacing.

This distinction concerns request semantics, not the accuracy of foreground detection. A valid crop setting does not guarantee that the detected subject contains every strap, handle or required product edge.

Calculate directional overrides as replacements

With cropping enabled, margin supplies a general value for all sides. A directional field such as margin_right overrides that value for its particular side rather than adding to it.

For example, a general margin of 80px and a right override of 200px expresses 80px at the top, bottom and left, with 200px at the right. It does not mean 280px at the right.

The margin controls are marked beta. Pixelcut documents percentage strings from 0% through 49% and pixel strings starting at 0px. Do not combine percentage and pixel choices into an assumed formula that the source does not specify.

This illustrative JSON shows the relevant request fields:

{
  "image_url": "https://assets.example.invalid/bottle.png",
  "crop": true,
  "margin": "80px",
  "margin_right": "200px",
  "shadow": {
    "enabled": false
  },
  "format": "png"
}

Keep shadows and delivery behavior outside the margin calculation

Pixelcut also documents optional AI-generated shadows. Enabling the shadow adds three credits. If light_source is supplied, its values replace automatic light-direction estimation. Neither control changes the documented prerequisite for margins.

For a clean product cutout, do not enable shadow merely to compensate for an awkward crop. Decide whether a shadow belongs in the final visual treatment only after establishing the desired canvas relationship.

The documented output format is PNG. Input constraints include supported JPEG, PNG, WebP, HEIC, HEIF and AVIF files, dimensions from 64 × 64 through 10000 × 10000 pixels, and a 50 MiB total request-body limit.

Record the source, crop setting, general margin, directional overrides and shadow choice as separate request decisions. Then inspect any returned file against its destination. Neither the selected values nor the PNG output contract guarantees exact product geometry.

Illustrative decision: a product tag needs extra clearance on the right

A seller has an approved product photograph showing a bottle with a hanging tag extending toward the right edge.

If the original canvas must remain unchanged for a catalog template, the seller chooses crop: false. Adding a margin field would not establish the requested additional space under Pixelcut's documented contract.

For a separate subject-led product card, the seller chooses crop: true, margin: "80px", and margin_right: "200px". The intended effective values are top 80px, bottom 80px, left 80px and right 200px.

A request with margin_right: "200px" does not ask for 200 additional pixels beyond the general 80px. The seller keeps shadow disabled because the task concerns framing, not lighting.

Next action: verify the crop prerequisite and effective side values in the proposed request, then examine the actual returned tag clearance before any asset handoff.

Where CartVisual fits

CartVisual offers a separate browser-local cutout tool. It does not implement Pixelcut's crop, margin, shadow or API output settings.

See the current CartVisual workflow and its limitations

Source and evidence scope

Prepared by the CartVisual editorial team with AI assistance. Competitor behavior is documented rather than independently executed for this guide.

Pixelcut: Remove Background

Official source snapshot checked .

The supplied Pixelcut API specification documents crop-dependent margins, directional replacement, beta values, optional shadows and input/output limits. Effective-side calculations are editorial interpretations of those fields. No request or image was processed, and exact crop geometry or shadow quality is not guaranteed.

Related decisions

Browse ecommerce creative workflows