Class ImageData

java.lang.Object
zombie.core.textures.ImageData
All Implemented Interfaces:
Serializable

public final class ImageData extends Object implements Serializable
See Also:
  • Field Details

    • data

      public MipMapLevel data
      the data of image
    • alphaPaddingDone

      public boolean alphaPaddingDone
    • bPreserveTransparentColor

      public boolean bPreserveTransparentColor
    • mask

      public BooleanGrid mask
    • id

      public int id
    • MIP_LEVEL_IDX_OFFSET

      public static final int MIP_LEVEL_IDX_OFFSET
      See Also:
  • Constructor Details

    • ImageData

      public ImageData(TextureID texture, WrappedBuffer bb)
    • ImageData

      public ImageData(String path) throws Exception
      Throws:
      Exception
    • ImageData

      public ImageData(int _width, int _height)
      creates a new empty imageData
      Parameters:
      _width - the width of imageData
      _height - the height of imageData
    • ImageData

      public ImageData(int _width, int _height, WrappedBuffer _data)
    • ImageData

      public ImageData(ImageDataFrame imageDataFrame)
    • ImageData

      public ImageData(InputStream b, boolean bDoMask) throws Exception
      Throws:
      Exception
  • Method Details

    • createSteamAvatar

      public static ImageData createSteamAvatar(long steamID)
    • getData

      public MipMapLevel getData()
    • makeTransp

      public void makeTransp(byte red, byte green, byte blue)
      make the image transparent
      Parameters:
      red - the red value (0-255)
      green - the green value (0-255)
      blue - the blue value (0-255)
    • makeTransp

      public void makeTransp(byte red, byte green, byte blue, byte alpha)
      make the image transparent
      Parameters:
      red - the red value (0-255)
      green - the green value (0-255)
      blue - the blue value (0-255)
      alpha - the alpha value that will be setted (0-255)
    • setData

      public void setData(BufferedImage image)
    • setData

      public void setData(Raster rasterData)
    • getHeight

      public int getHeight()
    • getHeightHW

      public int getHeightHW()
    • isSolid

      public boolean isSolid()
    • getWidth

      public int getWidth()
    • getWidthHW

      public int getWidthHW()
    • getMipMapCount

      public int getMipMapCount()
    • getMipMapData

      public MipMapLevel getMipMapData(int idx)
    • initMipMaps

      public void initMipMaps()
    • dispose

      public void dispose()
    • calculateNumMips

      public static int calculateNumMips(int _widthHW, int _heightHW)
    • getPixelDiscard

      public static int getPixelDiscard(ByteBuffer byteBuffer, int int3, int int1, int int2, int int0, int[] int5)
    • getPixelClamped

      public static int[] getPixelClamped(ByteBuffer byteBuffer, int int1, int int3, int int0, int int2, int[] int5)
    • setPixel

      public static void setPixel(ByteBuffer byteBuffer, int int3, int var2, int int1, int int2, int[] int4)
    • getNextMipDimension

      public static int getNextMipDimension(int dim)