Python Forum
Help developing img cropping tool in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help developing img cropping tool in python
#4
I would myself definitely use for loops rather than while loops for this.
Also you need to reexamine what arguments Image.crop takes.

You wrote:
new = img.crop(vert_to_counter, vert_to_counter, 72, 72)
Firstly it takes one argument that is a tuple, and secondly the last two parts of that tuple are not height and width but rather, right and bottom of the desired box.
crop = img.crop((x, y, x+width, y+height))

If you can give me a full rez copy of one of your images I'll try to give you an example implementation.
Reply


Messages In This Thread
RE: Help developing img cropping tool in python - by Mekire - Dec-18-2017, 12:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question image manipulation (cropping and MetaData) SpongeB0B 4 1,262 Jul-03-2023, 06:35 PM
Last Post: SpongeB0B
  Is there software/tool for coding Python? dee 11 3,011 Jun-14-2022, 02:32 PM
Last Post: dee
  python tool to collect the time measurement of entire code maiya 3 2,376 Feb-12-2021, 05:39 PM
Last Post: BashBedlam
  I need advise with developing a brute forcing script fatjuicypython 11 5,335 Aug-21-2020, 09:20 PM
Last Post: Marbelous
  Best extension for Andriod developing ? samuelbachorik 1 1,648 Apr-29-2020, 01:30 PM
Last Post: Larz60+
  Developing application for Android atari400 1 1,968 Nov-27-2019, 08:31 AM
Last Post: buran
  Python Based Data QA Automation tool suggestion Sonia567 1 2,048 Nov-19-2019, 04:46 PM
Last Post: Larz60+
  Developing Python with OpenCV into an Android App AviationFreak 1 6,899 Sep-29-2019, 08:55 AM
Last Post: wavic
  Getting help on developing a code Masoudk96 1 2,027 Sep-04-2019, 10:48 PM
Last Post: Larz60+
  Python QGIS tool that replaces layout text labels with attributes from an input table geodenn92 1 2,737 Aug-13-2019, 06:05 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020