API Docs for: 2.0.0

Class pixelblock

Class defined in: src/node-pixelblock.js:11

Pixel block processing functions

Array dxt1ToPixelBlocks( dxt1Buffer, width, height, maxSize )
src/node-pixelblock.js:156

Chop DXT1 pixel buffer into square blocks

Parameters:
  • dxt1Buffer <Buffer>

    pixel buffer

  • width <Number>

    buffer width

  • height <Number>

    buffer height

  • maxSize <Number>

    block size (at most)


Returns: <Array>

array of buffer, one for each block of pixel

Array rgbaToPixelBlocks( rgbBuffer, width, height, maxSize )
src/node-pixelblock.js:58

Chop RGBA pixel buffer into square blocks (NYI)

Parameters:
  • rgbBuffer <Buffer>

    pixel buffer

  • width <Number>

    buffer width

  • height <Number>

    buffer height

  • maxSize <Number>

    block size (at most)


Returns: <Array>

array of buffer, one for each block of pixel

Array rgbToPixelBlocks( rgbBuffer, width, height, maxSize )
src/node-pixelblock.js:22

Chop RGB pixel buffer into square blocks (NYI)

Parameters:
  • rgbBuffer <Buffer>

    pixel buffer

  • width <Number>

    buffer width

  • height <Number>

    buffer height

  • maxSize <Number>

    block size (at most)


Returns: <Array>

array of buffer, one for each block of pixel

Array yuv420ToPixelBlocks( yuvBuffer, width, height, maxSize )
src/node-pixelblock.js:94

Chop YUV420 pixel buffer into square blocks

Parameters:
  • yuvBuffer <Buffer>

    pixel buffer

  • width <Number>

    buffer width

  • height <Number>

    buffer height

  • maxSize <Number>

    block size (at most)


Returns: <Array>

array of buffer, one for each block of pixel

Array yuv422ToPixelBlocks( yuvBuffer, width, height, maxSize )
src/node-pixelblock.js:142

Chop YUV422 pixel buffer into square blocks (NYI)

Parameters:
  • yuvBuffer <Buffer>

    pixel buffer

  • width <Number>

    buffer width

  • height <Number>

    buffer height

  • maxSize <Number>

    block size (at most)


Returns: <Array>

array of buffer, one for each block of pixel