cutting up image

This forum is currently in read-only mode.
From the Asset Store
Cut Fruit
$19 USD
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • If I had a picture for example 288x288 pixels in size,how could I cut it up at runtime to make 9 sprites of 96x96 pixels ,each with an individual different image on each one?

  • This is pretty hard to do; you'd have to use the Image Manipulator to load the main image in, then crop it to the images you need, save them, then load them into sprites. What are you trying to do?

  • Trying to modify my Slider game to use an image.At runtime I would like to load a random image cut it up and then use this as the game tile.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sounds like he's trying to make a stretchable 9-patch image, for making pretty boxes.

    I was thinking about this just the other day - the four corners would be regular sprites (aligned TL, TR, BL, BR corners), the top and bottom would be a tiled background running left-right, the sides would be tiled backgrounds top-bottom, and the middle would be a regular tiled bg in all directions.

    Then you could resize it at run-time and have all the parts snap to where they should be and have nice looking boxes for buttons, UI, etc. And I think he wants a way to automate this process.

    Of course, I could be wrong

    Edit: and it appears I was wrong. And slow.

  • depending on how much you know about displacement, this may or may not make sense

    let me know if you need help understanding what I did

    the tiles are drag droppable:

    download cap here

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/tiles2.PNG">

    one event

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/tiles.PNG">

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/tiles3.PNG">

  • This is pretty hard to do; you'd have to use the Image Manipulator to load the main image in, then crop it to the images you need, save them, then load them into sprites. What are you trying to do?

    Image manipulator is only saving in multiples of 256 right now.

  • here's a 98 version for those who don't have 99 installed:

    download cap here

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)