Skip to content

Conversation

@niranjan-uma-shankar
Copy link

@niranjan-uma-shankar niranjan-uma-shankar commented Dec 23, 2025

This extends the PPTXGenJS library to support rounded rectangle cropping of an image. This is used to crop a Chronicle card's background image to the same dimensions of a Chronicle card widget.

PPTXGenJS doesn't provide a straightforward way to overlay a background image on a rounded rectangle (a rect with all edges having a border radius). So, this approach directly crops the background image to have rounded corners.

Steps

  1. Checkout branch
  2. npm install
  3. To compile the library source changes, run:
npm run build && cp src/bld/pptxgen.cjs.js dist/pptxgen.cjs.js && cp src/bld/pptxgen.es.js dist/pptxgen.es.js
  1. Run node add_image_with_rounding.js . You should now see a new Image_With_Rounding.pptx in the project folder.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant