Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Memfis

cut a 1024-wide sky into 4 parts

Recommended Posts

I have a 1024-wide sky but I want it in 4 pieces because vanilla can't display 1024-wide textures I think, at least it didn't work for me. So what's the easiest way to cut it? The only thing I could think of is to

1 change the width to 256, save it as sky1-1
2 open the original pic, do a 180 flip, change the width to 768, flip again, change the width to 256, save it as sky 1-2
3 and so on

but maybe there are easier methods, maybe even a magical program with a magic button that would do all this instantly?

Share this post


Link to post

I have done this a few different times, and while I have some memory of having a really nice method I'm not sure I could recall it. What I might have done at one point is just opened the 1024-wide texture in Paint (always I use Paint), and cut out the far right 256 columns, pasted them into another window, saved the new picture as SKY1-4 or something, cropped out the now-blank 256px at the right edge, and repeated two more times. If there's a nifty one-click method of doing this, it's in a better image software and I don't know it.

Share this post


Link to post

You can use GIMP for a start. When you move stuff, it tells you by how much you move it. So put a canvas size of 256x128 (while keeping the layer size unchanged), then save as sky1a, move the layer to the right 256 pixels, save as sky1b, move the layer to right 256 pixels, save as sky1c, move the layer to the right 256 pixels, save as sky1d.

Other method, which requires a greater knowledge of the tools: you can use the following two plugins:
Guillotine into layers
Export layers as PNG
Then use the guillotine function of the GIMP to cut the image into four slices of 256x128, and export them.

Finally, a Gimp-free method: open your archive with the 1024x128 pic in SLADE. Run the texture editor, create a ZDoom-style TEXTURES lump. Create a new texture, 256x128, use your pic as a patch. Copy/paste the texture, then x-offset the patch by 256. Copy/paste again, change the offset to 512. Copy/paste once more, change the offset to 768. Now select your four textures, and export them to single images, either in the archive or as PNG files outside. You can now delete the TEXTURES lump.

Bonus method: install ImageMagick and read its manual. You can do that in a single command line if you know how to use it.

Share this post


Link to post

IrfanView's selection tool does the job for me. It displays the starting co-ordinates (top-left corner), dimensions and aspect ratio of the selected area in the title bar as you drag the borders about. Having selected your corner of sky, crop selection (CTRL+Y) and save under a new name, then re-open your wide sky, create a selection box 256 pixels to the right of the last one and crop-save-repeat until you run out of sky.

Share this post


Link to post
Gez said:

You can use GIMP for a start. When you move stuff, it tells you by how much you move it. So put a canvas size of 256x128 (while keeping the layer size unchanged), then save as sky1a, move the layer to the right 256 pixels, save as sky1b, move the layer to right 256 pixels, save as sky1c, move the layer to the right 256 pixels, save as sky1d.


You can also use the "offset" command in Layer -> Transform; or set the offset when you change the canvas size, save to a new file, then undo and resize the canvas with a new offset etc.

Share this post


Link to post
Gez said:

Bonus method: install ImageMagick and read its manual. You can do that in a single command line if you know how to use it.

Awesome, thanks a lot. Typing "convert sky1.gif -crop 256x128 sky1.png" seems to be the easiest method suggested so far. :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×