Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what do the parameters of bbox mean in pillow?

I am trying to take a screenshot of a delimited area of the screen using Pillow (python), but I'm having trouble figuring out what the four parameters mean. I searched the docs, but they only say it is a bbox, but not what they mean, someone know where is this specified?

This is the code I am trying to use, what do 'a', 'b', 'c' and 'd' represent?

ImageGrab.grab(bbox=(a,b,c,d))
like image 458
Yuri Waki Avatar asked Oct 25 '25 14:10

Yuri Waki


1 Answers

according to the doc

Parameters: bbox – What region to copy. Default is the entire screen.

so as for the box the parameters are positions

Parameters: box – The crop rectangle, as a (left, upper, right, lower)-tuple.

As @Yury mention it below, a better explanation then the documentation can be found on this blog here

like image 156
Novy Avatar answered Oct 28 '25 04:10

Novy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!