when blp width or height bigger then 512px .some problem happend
PhoenixZeng opened this issue · 2 comments
PhoenixZeng commented
1.the blp size will force to 512 which length then 512px
2.some color maybe lost
DrSuperGood commented
That part of the code probably needs updating. The plugin was originally written before Warcraft III Reforged added support for loading mipmap levels larger than 512 pixels in any dimension.
PhoenixZeng commented
Use the following code to avoid problem 1:
ImageOutputStream outputStream = ImageIO.createImageOutputStream(newFile);
ImageWriter writer = ImageIO.getImageWritersByFormatName(ext).next();
BLPWriteParam blpWriteParam = new BLPWriteParam();
blpWriteParam.setScaleOptimization(BLPWriteParam.ScaleOptimization.NONE);
writer.setOutput(outputStream);
writer.write(null, new IIOImage(bufferedImage, null, null), blpWriteParam);
writer.dispose();
Problem 2: I seem to have fixed it, but I forgot the corresponding code