Results 1 to 2 of 2
  1. #1
    jammas615 is offline Senior Member
    Join Date
    Jul 2011
    Melbourne, Victoria, Australia
    Rep Power

    Default One big texture file?

    Hey guys,

    I have a png image that has all the sqaure textures i require. I want to know if it is possible to make smaller images from one large one. I am sure this is possible but just cant seem to figure it out.

    Here's what i have:

    One .png with all textures in it.
    -> Size is 64x64
    -> Each individual texture is 16x16

    I want to turn one 64x64 into 4 16x16's.


  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Rep Power

    Default Re: One big texture file?

    Take a look at the BufferedImage class
    BufferedImage (Java Platform SE 6)
    The image can be read by ImageIO into a BufferedImage, 4 BufferedImage objects can be created, a Graphics object can be created from these objects, and a portion of the original drawn to said Graphics object.

Similar Threads

  1. Using Images In Java As A Texture Pack?
    By Alerhau in forum New To Java
    Replies: 6
    Last Post: 08-22-2011, 05:36 PM
  2. Java 3D QuadArray Texture Coordinates
    By ajtgarber in forum Advanced Java
    Replies: 0
    Last Post: 02-13-2011, 04:46 PM
  3. Replies: 8
    Last Post: 02-18-2010, 12:54 PM
  4. Replies: 5
    Last Post: 05-11-2009, 04:27 PM
  5. Replies: 0
    Last Post: 02-11-2009, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts