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

ImageMagick backend #10

Closed
gastonrobledo-santex opened this issue Jan 3, 2014 · 6 comments
Closed

ImageMagick backend #10

gastonrobledo-santex opened this issue Jan 3, 2014 · 6 comments

Comments

@gastonrobledo-santex
Copy link
Contributor

Are you sure that the implementation of bbox is correct in this case,

(bbox[2] - bbox[0], bbox[3] - bbox[1], bbox[0], bbox[1])

Here you are calculating the width and height from points but the other examples are with
X,Y, Width, Height

So using this you will have different behaviors from the different plugins!

Does it make sense?

I suggest to change the plugin as

(bbox[2] , bbox[3], bbox[0], bbox[1])

Thanks

@ponty
Copy link
Owner

ponty commented Jan 7, 2014

Which plugin has different behavior?

I checked scrot plugin, which is using X1,Y1, X2,Y2
( im.crop -> http://effbot.org/imagingbook/image.htm)

imagemagick needs X,Y, Width, Height as parameter, so that's why there is a conversion in the plugin
(http://www.imagemagick.org/script/command-line-options.php#crop)

@gastonrobledo-santex
Copy link
Contributor Author

Hi -

you example shows that you need to pass X, Y, Width, Height but inside the plugin it makes a calculation of width and height. That's all you need to check the examples. Otherwise normalize everything to X,Y, Width, Height ot X1,Y1,X2,Y2

Thanks

@ponty
Copy link
Owner

ponty commented Jan 7, 2014

Have you tried the examples?

python -m pyscreenshot.examples.showall

Can you send a sample program which has incorrect output?

@gastonrobledo-santex
Copy link
Contributor Author

You have the example on Readme file, if you see you are sending X,Y, Width and Height unless that 500,500 are points, but that is not clear! and you will have a box of 500-X as width and the same with Height, and yes I'm using your library, In fact I created a backend for mac using screencapture instead of other backends!

@ponty
Copy link
Owner

ponty commented Jan 7, 2014

I added X1,Y1, X2,Y2 to README and module doc.
It should be clear now.

You can send a pull request, if you have new back-ends!

@gastonrobledo-santex
Copy link
Contributor Author

I'll as soon I have this tested!

Thanks!

On Tue, Jan 7, 2014 at 12:24 PM, ponty notifications@github.com wrote:

I added X1,Y1, X2,Y2 to README and module doc.
It should be clear now.

You can send a pull request, if you have new back-ends!


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-31746282
.

@ponty ponty closed this as completed Apr 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants