totigm / whatsapp-stickers-bot

This is a WhatsApp bot to convert images and videos to stickers
MIT License
5 stars 2 forks source link

🚀 Add aspect ratio management for image resizing #6

Open totigm opened 10 months ago

totigm commented 10 months ago

Is your feature request related to a problem? Please describe.

Currently, the bot's image resizing feature requires specific width and height values, which can sometimes distort the image if the original aspect ratio is not maintained. Users might find it frustrating when they need to maintain the aspect ratio but have to manually calculate the dimensions.

Describe the solution you'd like

Implement an argument or option that allows users to resize images while maintaining the original aspect ratio. This would provide a more user-friendly way to resize images without distortion.

Implementation proposal

Introduce a new argument, such as maintainAspectRatio, which when used with the resize command, automatically calculates the appropriate dimensions to maintain the aspect ratio. Alternatively, enhance the existing resize function to detect when only one dimension (width or height) is provided and automatically adjust the other dimension to maintain the aspect ratio.

More information (Optional)

This feature would be particularly useful for users who are not familiar with image dimensions and aspect ratios but wish to resize images quickly and efficiently.