I’m trying to autoCut
my sprites (2D)…
however get this message:
Invalid upload size : 888x24 should be 1024x32
Called from h3d.mat.Texture.checkSize (h3d/mat/Texture.hx line 304)
Called from h3d.mat.Texture.uploadBitmap (h3d/mat/Texture.hx line 314)
Called from h2d.Tile.upload (h2d/Tile.hx line 346)
Called from h2d.$Tile.autoCut (h2d/Tile.hx line 410)
because my image has a dimension of 888x24
but shouldn’t that be fine? It’s just what I’m working with!
The error comes from checkSize
in h3d.mat.Texture.hx
function checkSize(width, height, mip) {
var mw = this.width >> mip; if( mw == 0 ) mw = 1;
var mh = this.height >> mip; if( mh == 0 ) mh = 1;
if( width != mw || height != mh )
throw "Invalid upload size : " + width + "x" + height + " should be " + mw + "x" + mh;
}
What is this check for? Shouldn’t I be able to use any image dimension? (I mean any dimension that can be divided correctly, by 24 in this case)
Why is it forcing me to use 32 at all?
Thank you. Have a good day.