Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

width and height should be allowed to be excluded (no defaults) #189

Open
crisog opened this issue Oct 14, 2023 · 1 comment
Open

width and height should be allowed to be excluded (no defaults) #189

crisog opened this issue Oct 14, 2023 · 1 comment
Assignees

Comments

@crisog
Copy link

crisog commented Oct 14, 2023

I've been using pdf-image but switched to this library as the former only supports writing to the file system.

I've encountered an issue with this library regarding its default settings for width and height. These default values interfere with the behavior of the underlying library which already does a good job when these options are not specified.

I think there should be a way to omit specifying width and height when invoking GraphicsMagick, thus leveraging its native capabilities for better results.

Kind of related to #88

@mskec mskec self-assigned this Nov 4, 2023
@mskec
Copy link
Collaborator

mskec commented Nov 18, 2023

Hi @crisog, you can set width and height to undefined and allow the underling library to set aspect ratio. You can find some examples -> #88 (comment)

mskec added a commit that referenced this issue Nov 18, 2023
When set to true and both width and height are specified, they are interpreted as the minimum width and minimum height, respectively.
If set to true with only the width specified, the height will be automatically determined while preserving the aspect ratio, and vice versa.

fixes #88, #189
mskec added a commit that referenced this issue Nov 18, 2023
When set to true and both width and height are specified, they are interpreted as the minimum width and minimum height, respectively.
If set to true with only the width specified, the height will be automatically determined while preserving the aspect ratio, and vice versa.

fixes #88, #189
mskec added a commit that referenced this issue Nov 18, 2023
When set to true and both width and height are specified, they are interpreted as the minimum width and minimum height, respectively.
If set to true with only the width specified, the height will be automatically determined while preserving the aspect ratio, and vice versa.

fixes #88, #189
mskec added a commit that referenced this issue Nov 18, 2023
When set to true and both width and height are specified, they are interpreted as the minimum width and minimum height, respectively.
If set to true with only the width specified, the height will be automatically determined while preserving the aspect ratio, and vice versa.

fixes #88, #189
mskec added a commit that referenced this issue Nov 18, 2023
When set to true and both width and height are specified, they are interpreted as the minimum width and minimum height, respectively.
If set to true with only the width specified, the height will be automatically determined while preserving the aspect ratio, and vice versa.

fixes #88, #189
yakovmeister pushed a commit that referenced this issue Nov 20, 2023
* feat(preserveAspectRatio): added option to preserve aspect ratio

When set to true and both width and height are specified, they are interpreted as the minimum width and minimum height, respectively.
If set to true with only the width specified, the height will be automatically determined while preserving the aspect ratio, and vice versa.

fixes #88, #189
@github-project-automation github-project-automation bot moved this to To do in v4 Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

2 participants