Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

cutting up a very large image into tiles

  • Please log in to reply
1 reply to this topic
  • Members
  • 1 posts
  • Last active: Sep 03 2013 09:03 PM
  • Joined: 03 Sep 2013

I have an application that shows a very large (>2GB) picture "through a keyhole": The whole picture is maybe 50 x 100 "windows" or tiles large.

Now I want to dump each of the 5000 tiles to a .jpg and stitch them together later.

The application I display the picture with, on screen,  lets me print a window/tile at a time, to a virtual jpg-printer (Zan Printer), by means of a print button.

So I thought, I could make a AHK script, to double-loop over the image, displaying the tiles row by row, column by column and "print" each tile to a jpg-file.

During the looping of the script, I see the various tiles displayed on screen, one after the other. No problem there.


Only the first displayed tile is printed to a jpg file when the print button is "pressed" by AHK.

If I do all this "by hand", without AHK,  things work out well: I get all the tiles neatly in their jpg file.

It seems that clicking the scroll bar during recording does not record that scrolling movement.


So how can I get the window actually scroll left, right, up or down during macro execution?


Any suggestions?



  • Members
  • 868 posts
  • Last active: Jan 25 2016 01:29 AM
  • Joined: 04 Mar 2013

Hi Erik2055,


That sounds pretty cool!


Can you post the actual code you have to scroll left, right, up, or down so we can see what doesn't work?


Are you doing something like this:

Loop 5
  Click WheelUp

As a side note you might consider 'stitching them together' with GDI+ like Tic suggested in this post.

My script runs in A_AhkVersion:=, get the latest version at http://ahkscript.org/download/

Check out this AutoHotkey tutorial: http://ahkscript.git...o/AHK_Tutorial/

Read the documentation: http://ahkscript.org.../AutoHotkey.htm