How to use Qupath break down image.svs to many pieces .jpg

Dear Guru
I m so new in Qupath just first time download new version 0.2.3.
Now I’ m working on image analysis project in pathology.
I have an image.svs(SImage.svs) and I can open in Qupath and prepare for doing the next step.
Source: SImage.svs size ( widith 28,841 px , height 24,108 px)
Target: TImage1.jpg-Timagex.jpg (width 2,592 px height 1,944 px)
Roughly say, source/target=137.98 pieces.
I want to break down SImage.svs to TImage1-TImage138.jpg.
Can I use Qupath’s scripting to do this ?
Please kindly give me some advice step by step?
If you have any code/script ,It’s my appreciation.
Banatus Soiraya

Sample image and/or code

  • Upload an original image file here directly or share via a link to a file-sharing site (such as Dropbox) – (make sure however that you are allowed to share the image data publicly under the conditions of this forum).
  • Share a minimal working example of your macro code.


  • What is the image about? Provide some background and/or a description of the image. Try to avoid field-specific “jargon”.

Analysis goals

  • What information are you interested in getting from this image?


  • What stops you from proceeding?
  • What have you tried already?
  • Have you found any related forum topics? If so, cross-link them.
  • What software packages and/or plugins have you tried?

Hi @banatus_Soiraya, I think you might need the TileExporter:

Thank you Petebankhead.
Due to I am new in Qupath and Java.
I want to test this in my script with windown 10 environment.
“// Write the full image (only possible if it isn’t too large!)
def server = getCurrentServer()
writeImage(server, ‘/path/to/export/full.tif’)”
Q1:How can I refer export path in my windows 10 OS.
My pc: C:\Users\Administrator\AppData\Local\QuPath-0.2.3 (Application location)
My pc project folder :C:\Users\Administrator\qupath_db
My pc image/export folder :C:\Users\Administrator\qupath_db\image
Q2: How can I know the getCurrentServer() function:
and variable server in the detail? What did they perform?
Can I find the these information of each function in the detail?
Thank you
Banatus S

It doesn’t look like you chose to export tiles, but to try to write out the whole image. From your previous post, it sounded like you wanted the TileExporter, but you did not use the script Pete linked?

That script also builds the file path for you, which is easier than writing it out yourself. There are a few other posts on the forum showing correct file paths. For example: