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

Not significant difference in output image while using crop options #80

Open
gayu19 opened this issue Nov 26, 2021 · 1 comment
Open
Assignees
Labels

Comments

@gayu19
Copy link

gayu19 commented Nov 26, 2021

Describe the bug
When we use crop parameters in options for example 'crop-h': '3', then if the value is positive then we are getting a blank white box and if we are using negative value then it displays the complete image no matter what the negative value is. So while using different values we should see the difference in image, but here the issue is there is no standard output of these crop options. I have following queries for this.

  • What values can be provided to the “crop-h“, “crop-w“, “crop-x“, “crop-y“
  • What is the min and max for it
  • What is the measuring parameter of "3" for image in 'crop-h': '3'
  • What will be the default value if we won't provide “crop-h“, “crop-w“, “crop-x“, “crop-y“

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/jarrekk/imgkit#usage
  2. Use the options parameter given in the description to crop the image
  3. Try with several positive and negative values for “crop-h“, “crop-w“, “crop-x“, “crop-y“ and check the image output

Expected behavior
There should be some standard pattern of output after using these crop options. Also need some more documentation support for these options while converting html to image.

  • OS: [MacOSX]
  • IMGkit Version [imgkit 1.2.2]
  • wkhtmltopdf Version [0.12.6]
@ltfavas
Copy link

ltfavas commented Jan 10, 2022

(crop-x, crop-y, default 0,0) coordinates for top left corner
(crop-w, crop-h) coordinates for bottom right corner

values are basically pixels. if you're lost open any image in python with Pillow show() and move the mouse on top of the image, you will see x,y values changing.
Hope that helps somewhat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants