[GH-ISSUE #1320] [Feature Request] Independent Image Scaling and Positioning When Resizing Canvas #972

Closed
opened 2026-02-26 09:33:11 +03:00 by kerem · 2 comments
Owner

Originally created by @bqliang on GitHub (Jul 23, 2024).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1320

Originally assigned to: @NickeManarin on GitHub.

For certain reasons, I often need to set the canvas size after recording, while repositioning and resizing the originally recorded image. For example, if the recording size is 100px by 100px, after recording, I want to adjust the canvas size to 200px by 200px, with the original image size unchanged, still 100px by 100px. I want to move the image to the center of the canvas, meaning the canvas may be transparent or black, and the true recorded content is only in the central 100px by 100px area. I'm not sure if my description is clear enough, but currently, ScreenToGif only allows me to adjust the canvas size, and the image resizes along with the canvas (it always stretches to fill the canvas).

In the future, would it be possible to allow independent scaling and moving of the image while adjusting the canvas size?

Originally created by @bqliang on GitHub (Jul 23, 2024). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1320 Originally assigned to: @NickeManarin on GitHub. For certain reasons, I often need to set the canvas size after recording, while repositioning and resizing the originally recorded image. For example, if the recording size is 100px by 100px, after recording, I want to adjust the canvas size to 200px by 200px, with the original image size unchanged, still 100px by 100px. I want to move the image to the center of the canvas, meaning the canvas may be transparent or black, and the true recorded content is only in the central 100px by 100px area. I'm not sure if my description is clear enough, but currently, ScreenToGif only allows me to adjust the canvas size, and the image resizes along with the canvas (it always stretches to fill the canvas). In the future, would it be possible to allow independent scaling and moving of the image while adjusting the canvas size?
kerem 2026-02-26 09:33:11 +03:00
Author
Owner

@NickeManarin commented on GitHub (Sep 7, 2024):

You can manage to do this by using the border feature and setting a negative margin.

image

With the successor of ScreenToGif v2, it will be possible to work with layers, so the canvas size can be resized independently and the layers can be freely moved/resized as well.

<!-- gh-comment-id:2335250743 --> @NickeManarin commented on GitHub (Sep 7, 2024): You can manage to do this by using the border feature and setting a negative margin. ![image](https://github.com/user-attachments/assets/94aef516-7426-4217-9bd3-7bae5a3eacdd) With the successor of ScreenToGif v2, it will be possible to work with layers, so the canvas size can be resized independently and the layers can be freely moved/resized as well.
Author
Owner

@bqliang commented on GitHub (Sep 7, 2024):

You can manage to do this by using the border feature and setting a negative margin.

image

With the successor of ScreenToGif v2, it will be possible to work with layers, so the canvas size can be resized independently and the layers can be freely moved/resized as well.

@NickeManarin This is a clever workaround with the border! But I’m really looking forward to the future layer feature. My goal is to adjust the overall canvas size, and with the border method, I’d still have to manually calculate the border sizes for each side (top, bottom, left, and right) as: target canvas size - recording size.

<!-- gh-comment-id:2335579245 --> @bqliang commented on GitHub (Sep 7, 2024): > You can manage to do this by using the border feature and setting a negative margin. > > ![image](https://private-user-images.githubusercontent.com/14798947/365375751-94aef516-7426-4217-9bd3-7bae5a3eacdd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3MjM4NjMsIm5iZiI6MTcyNTcyMzU2MywicGF0aCI6Ii8xNDc5ODk0Ny8zNjUzNzU3NTEtOTRhZWY1MTYtNzQyNi00MjE3LTliZDMtN2JhZTVhM2VhY2RkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA3VDE1MzkyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhYzYwMThkYTE4ZjM2MDY5YWU1MjU2N2U3YjVhYmRhMGNlOTMzZDM1OTg5NTJlYzI1N2Q4ZDRlNjU2ZWE2NjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vN3r2eQ5eYm2oqTt5QsF7rQtTh-DZcjsQ-vDN3FbatY) > > With the successor of ScreenToGif v2, it will be possible to work with layers, so the canvas size can be resized independently and the layers can be freely moved/resized as well. @NickeManarin This is a clever workaround with the border! But I’m really looking forward to the future layer feature. My goal is to adjust the overall canvas size, and with the border method, I’d still have to manually calculate the border sizes for each side (top, bottom, left, and right) as: target canvas size - recording size.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#972
No description provided.