Jump to content
You must now use your email address to sign in [click for more info] ×

cutting 1 image into 4 equal parts


Recommended Posts

1 minute ago, R C-R said:

I get an 'xcrun' error:

Probably means you haven't python3 installed.

Caveat: I would not follow my advice for installing it, so I am not going to offer any because we have different OSes and I have forgotten how I did it. python.org has the best advice.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

7 minutes ago, R C-R said:

So from what I read elsewhere on the web, my problem begins with the developer tools not being installed on my Mac. There is a solution for that but it just adds to the number of things I would have to do before I could use the script.

Without the XCode (CLI) command line tools, you can't compile a Python 3.x source distribution yourself. Thus you will need instead to install a ready precompiled MacOS Python 3.x binary distribution version.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

33 minutes ago, v_kyr said:

That's usually no problem, since it installs the newer one into "/usr/local/bin" not conflicting with Apple's old Python 2.7 which resides in "/usr/bin/python".
{...}
So you can usually safely do so.

The "usually" part of that is part of the reason I do not want to install Python 3 on my iMac at this time. 

36 minutes ago, v_kyr said:

The Affinity format isn't usable outside of Affinity and Affinity itself also doesn't export to so many file formats.

True, but inside an Affinity format document there is a lot I can do with the bitmap fill method that, even if it was doable from the CLI via a Python script or whatever, I would much prefer to do interactively inside Affinity, & be able to use the built-in features I already know how to use quite well, like the History panel, Export Persona, etc.

42 minutes ago, v_kyr said:

And I claim here, that before anyone even built a 4 x 8 grid or so the right way sized up in Affinity, I've already split >= 20 images with such a script into the peaces I may need. - That is the essential point for me, do not dwell long around with such peanuts things.

I don't dispute that, but for me the essential point is I can't use the script without installing Python3 & the supporting stuff, which for me is not just a few peanut things.

So my short version is there no "one size fits all" solution for this. That is all I am trying to make clear.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

1 hour ago, v_kyr said:

That's usually no problem, since it installs the newer one into "/usr/local/bin" not conflicting with Apple's old Python 2.7 which resides in "/usr/bin/python".

FWIW, on my Mac /usr/bin/python is just an alias that points to /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7. 

There is also a Python2.7 alias in the same location, also pointing to the same framework.

Oddly (I guess) there is also a Python3 UNIX executable file (not an alias) at path /usr/bin/ with a mod date of October 30, 2020 & a file size of 31KB.

I am not sure what to make of this, but it certainly adds to my hesitation to install anything else Python related!

 

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

10 minutes ago, R C-R said:

but for me the essential point is I can't use the script without installing Python3 & the supporting stuff, which for me is not just a few peanut things.

So my short version is there no "one size fits all" solution for this. That is all I am trying to make clear.

You have summed up my concerns about scripting languages.

It should be possible to download and install Python with out having to download and install Xcode so we can compile it. I went the Python.org route. Modules are another separate pain.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

35 minutes ago, R C-R said:

FWIW, on my Mac /usr/bin/python is just an alias that points to /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7. 

There is also a Python2.7 alias in the same location, also pointing to the same framework.

Oddly (I guess) there is also a Python3 UNIX executable file (not an alias) at path /usr/bin/ with a mod date of October 30, 2020 & a file size of 31KB.

I am not sure what to make of this, but it certainly adds to my hesitation to install anything else Python related!

Nope that doesn't go there, you are somehow over-anxious and it seems you don't know much about those dev software things. - I wonder that you even installed some third party software at all on your system then.

Do yourself a favor and read some docs about the usual MacOS Python installation processes, maybe you then want to will give it a try:

Quote

...

5.1. Getting and Installing MacPython

macOS since version 10.8 comes with Python 2.7 pre-installed by Apple. If you wish, you are invited to install the most recent version of Python 3 from the Python website (https://www.python.org). A current “universal binary” build of Python, which runs natively on the Mac’s new Intel and legacy PPC CPU’s, is available there.

What you get after installing is a number of things:

  • A Python 3.9 folder in your Applications folder. In here you find IDLE, the development environment that is a standard part of official Python distributions; and PythonLauncher, which handles double-clicking Python scripts from the Finder.

  • A framework /Library/Frameworks/Python.framework, which includes the Python executable and libraries. The installer adds this location to your shell path. To uninstall MacPython, you can simply remove these three things. A symlink to the Python executable is placed in /usr/local/bin/.

The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. You should never modify or delete these, as they are Apple-controlled and are used by Apple- or third-party software. Remember that if you choose to install a newer Python version from python.org, you will have two different but functional Python installations on your computer, so it will be important that your paths and usages are consistent with what you want to do.

...

There are thousends of people before you which already did those installments. 😄

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

28 minutes ago, Old Bruce said:

You have summed up my concerns about scripting languages.

At this point, my biggest concern is I do not want to break anything that already works the way I expect it to. It seems like the chances of that happening have increased dramatically over the years as the macOS gets more complex, more security & privacy restrictions are added, & more processes interact with others in ways I do not understand.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

34 minutes ago, Old Bruce said:

You have summed up my concerns about scripting languages.

Another one who fears scripting languages, compilers and all the dev stuff needed to build software for his MacOS system, 😀.

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

2 minutes ago, v_kyr said:

Nope that doesn't go there, you are somehow over-anxious and it seems you don't know much about those dev software things. 

I am not sure exactly which things you mean but I have never knowingly made any modifications to /usr/bin/ or installed anything there, so I assume anything installed there came from a macOS update or upgrade.

7 minutes ago, v_kyr said:

I wonder that you even installed some third party software at all on your system then.

Why? What does that have to do with getting Python properly installed?

8 minutes ago, v_kyr said:

Do yourself a favor and read some docs about the usual MacOS Python installation processes, maybe you then want to will give it a try:

I would want to give it a try if & only if I had a use for it. Since I currently do not, I would rather spend my time learning about other things that interest me more.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

5 minutes ago, R C-R said:

At this point, my biggest concern is I do not want to break anything that already works the way I expect it to. It seems like the chances of that happening have increased dramatically over the years as the macOS gets more complex, more security & privacy restrictions are added, & more processes interact with others in ways I do not understand.

Then never install anything, you also then better deinstall all Affinity stuff etc. and use just the plain operating system. - Or if you feel better then, make some full TimeMachine backup before, so you can restore your actual state.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

5 minutes ago, v_kyr said:

Another one who fears scripting languages, compilers and all the dev stuff needed to build software for his MacOS system, 😀.

If that refers to me being afraid of scripting then you do not know me at all.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

4 minutes ago, v_kyr said:

Another one who fears scripting languages, compilers and all the dev stuff needed to build software for his MacOS system, 😀.

The only thing I fear in this respect is breaking something that will take me more time to diagnose & correct than it would save me if & when it is working correctly.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

2 minutes ago, R C-R said:

I am not sure exactly which things you mean but I have never knowingly made any modifications to /usr/bin/ or installed anything there, so I assume anything installed there came from a macOS update or upgrade.

Man read the link I've pointed you to, aka "Getting and Installing MacPython", that doesn't install anything into /usr/bin!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

2 minutes ago, v_kyr said:

Then never install anything, you also then better deinstall all Affinity stuff etc. and use just the plain operating system.

That doesn't make any sense. I have lots of stuff installed that works correctly. Why would I want to uninstall any of it?

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

1 minute ago, R C-R said:

That doesn't make any sense. I have lots of stuff installed that works correctly. Why would I want to uninstall any of it?

All can break, your next system update might break certain previously installed and working app things too! - That's the essence of what I meant here, it's all bits and bytes and some of them can go wild sometimes. You see how often Affinity breaks or isn't installable for a bunch of people here in the forum. On the other hand, if you don't use Python at all, you are not going to learn and use it for your system etc., then let it be, it's Ok.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Just now, v_kyr said:

Man read the link I've pointed you to, aka "Getting and Installing MacPython", that doesn't install anything into /usr/bin!

So why is there already a UNIX executable named Python3 installed there. I certainly never installed it. The link you mentioned says nothing about why that is already there or what if anything I should do about it.

Beyond that, it mentions several things like reading the tutorial in IDLE if I am completely new to Python, which I am, it is important that my paths and usages are consistent with what I want to do, which I am not sure to do, & so on.

Simply put, I am not interested in investing the time to sort all this out just to run a script I would rarely if ever use. Is that so hard to understand?

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

16 minutes ago, R C-R said:

So why is there already a UNIX executable named Python3 installed there.

What's so difficult to distinguish between two different paths, namely /usr/bin/python used by Apple, and /usr/local/bin/python3 used by Python.org (it's too just a link)?

And next, how and where are command line programs install on Unix like operating systems, where under which paths will they be traditional searched & executed from? - Tell me, which is the OS system based and related one, and which is third party based from those two? - Next general Q, how are Unix like file systems and their basic paths generally structured here and what is meant for what purposes?  -- If you can answer those Q's correctly to yourself, then you already know the answer and why!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

26 minutes ago, R C-R said:

Simply put, I am not interested in investing the time to sort all this out just to run a script I would rarely if ever use. Is that so hard to understand?

Why did you then started a discussion about Python, your Python 2.7 and the like here at all? - Why do you comment on things like that py-script you are either way not interested in? - So why do you waste your and my time with all that blabla then here at all? - I was going to help you with your Python installment, since you started that theme here that you can't run it with your Python v.2.7 etc.!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

33 minutes ago, v_kyr said:

What's so difficult to distinguish between two different paths, namely /usr/bin/python used by Apple, and /usr/local/bin/python3 used by Python.org (it's too just a link)?

My question is why is there already a Python3 executable at path /usr/bin on my Mac, not at /usr/local/bin.

18 minutes ago, v_kyr said:

Why did you then started a discussion about Python, your Python 2.7 and the like here at all?

What do you mean? You are the one who first suggested using a Python 3 script for this in this discussion. I replied with why that might not be as trivial as you were suggesting & why the bitmap fill method might be easier for some of us to use.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

32 minutes ago, R C-R said:

My question is why is there already a Python3 executable at path /usr/bin on my Mac, not at /usr/local/bin.

Ah Ok, so you have one already there in that path, strange, I thought you meant before you haven't installed any Python 3 distro before and have just Apple's default python v.2.7.

32 minutes ago, R C-R said:

... using a Python 3 script for this in this discussion. I replied with why that might not be as trivial as you were suggesting & why the bitmap fill method might be easier for some of us to use.

Jip, I meant if you want to try that python stuff, better use a much newer Python 3 instead of the older Python 2.7. - But so far I always thought and understood that you haven't yet installed any Python 3 distro at all!

Well if you have an Python3 file already there it must stem from somewhere! - Ok let's see what Google tells us about Catalina you use ...

And the answer there is:

Quote

Kinda. A clean installation of Catalina includes a /usr/bin/python3 binary, but it's a stub for installing the command line developer tools, which includes Python 3.

enter image description here

If/when the command line developer tools are installed, the /usr/bin/python3 stub will run the actual python3 binary, but a clean install will just have the stub.

The Python 2 binaries (/usr/bin/python /usr/bin/python2) are still present on a default installation, but they are deprecated and the warning message says they will be removed in future versions.

So it comes as default from Apple with your Apple MacOS Catalina installment, but it's a stub for installing the command line developer tools, which includes Python 3. - This probably means, if you now install the Apple MacOS Catalina command line developer tools, that Python3 will work afterwards! - You can download that from Apple.

Or try out what is shown there above in that screenshot, do in Terminal.app a "/usr/bin/python3 --version", maybe you then see the same dialog which asks to install the Apple CLI dev tools. - If that works Ok you should be fine with Python3 afterwards!

 

See for example also:

 

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

14 minutes ago, v_kyr said:

So it comes as default from Apple with your Apple MacOS Catalina installment, but it's a stub for installing the command line developer tools, which includes Python 3.

Unfortunately, I do not get the notice asking if I want to install the developer tools like in the Google link 'answer' reply. Instead, like I wrote here, I get an xcrun: error. The message is slightly different if I try the "/usr/bin/python3 --version" command  instead of just double-clicking on the stub file, but it amounts to the same error.

I am not sure why that is but it is enough to convince me to leave things as they are & move on to something else, like playing with the bitmap fill possibilities. If I was a developer or was interested in learning to write Python scripts, it would be different, but I am not.

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Hmm, did you also already tried an "xcode-select --install" in Terminal.app, does that behave the same then here?

Though you would generally need probably admin rights (sudo ...) to execute those calls at all, since those Apple CLI dev tools package installs into their system level paths.

Quote

> sudo xcode-select --reset
>
sudo xcode-select --install

However, those are Apple's own created setups in Catalina (also the python3 stub there) and nothing which is based on the installers of the corresponding third party CLI tools themself here. So if neither of these procedures work, you have to blame Apple for that behavior, but not the tools inside of the package Apple put together for downloading from their websites!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

22 minutes ago, v_kyr said:

Hmm, did you also already tried an "xcode-select --install" in Terminal.app...

No. Like I said, I have no current interest in or need for the xcode developer tools. 

All 3 1.10.8, & all 3 V2.4.2 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

The method to get Designer (or another Affinity app) to apply a bitmap image fill automatically to the width of the selected rectangle grid is to initially apply it on merged shapes, then separate the curves. After that any image will be automatically fitted to the width of the selected rectangle grid and there is no need to do grouping (or fiddle with the size control, unless there is need to adjust the image height to fully fill the grid vertically):

 

A verbal recipe to split an image in Designer (applicable in other Affinity apps, as well) would be :

  1. Create a rectangle that has the desired width and height of the complete grid.
  2. Set the width and height of the cell rectangle by dividing the dimension by the desired number of cells wanted horizontally (width) and vertically (height).
  3. Set the necessary snapping options (at least snapping to object bounding boxes) and turn on snappling. Position the cell rectangle at the desired top left corner, then press and hold Alt/Opt key and drag the rectangle to copy it and snap it beside the source rectangle. 
  4. Press Ctrl/Cmd + J (Edit > Duplicate) to duplicate the rectangle using the last used positional offset, until the desired number of cell "columns" have been created.
  5. Select all rectangles, press and hold Alt/Opt key and drag the source row to copy it and snap it immediately below, then press Ctl/Cmd + J to duplicate until you have the desired number of rows.
  6. Select all, then choose Layer > Geometry > Merge curves.
  7. Click/select the Fill Tool (G), choose "Bitmap" from the Type dropdown on the context toolbar, select the desired bitmap image. The image should be automatically fitted to the width of the rectangle grid. If the height of the grid is not fully filled, drag the size controls until the grid is fully covered by the image.
  8. Choose Layer > Geometry > Separate curves. The rectangle grid has now the applied image split into separate curves, ready to be further manipulated as vector objects (and optionally exported to desired file formats using the Export Persona). 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.