Skip to content

Commit

Permalink
Merge pull request #625 from justprodev/main
Browse files Browse the repository at this point in the history
copyExpandCanvas: pass original format when creating Image
  • Loading branch information
brendan-duncan authored Mar 22, 2024
2 parents b601c7d + 3bf53c9 commit 1d45423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/transform/copy_expand_canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Image copyExpandCanvas(Image src,

// Create a new Image with the specified dimensions or use the provided image
final Image expandedCanvas =
toImage ?? Image(width: newWidth, height: newHeight);
toImage ?? Image(width: newWidth, height: newHeight, format: src.format);

// If a background color is provided, set all pixels to that color
// If not, leave them transparent (default behavior)
Expand Down

0 comments on commit 1d45423

Please sign in to comment.