Nume1977/Nova3D-File-Manager

Add mono display support?

Opened this issue · 11 comments

Hi! Can you add mono display support? Need to size 3x times images by Y axis in "Printing file" panel.

Hi,
I have uploaded a new version. It scales the image preview on the print tab.
I am not sure it will scale your size correctly, but give it a try.

It shows printer pics at first layer and switch off (exits) after it

Sounds like a bug, going to investigate!
Could you please send a small cws file from your printer?

Please try the latest version. It should be more stable.
Some bugs are not caused by the manager, but bad firmware :(

https://github.com/Nume1977/Nova3D-File-Manager/releases/tag/1.0.2101270

It still run out.

Here file that I try to print. Unpack it first :)
nova-plug_3DSLA_TestModel.mono.cws.zip

I have unpacked it and unpacked the cws (a zip inside a zip... inception!).
The image size is very weird, your printer has a 1620 x 2560 pixels display, but the slicer creates 540 x 2560 pixels images...
Really, why Nova?!
I can only see 2 options :
a) You loose 2/3 resolution on one of the axis, because the image is stretched from 540p to 1620p (540*3) .
b) The firmware centers the original image and fills the missing 1080 pixels.

Anyway, i now understand the source of the problem. I will implement on the next few days a check for the Y size, if it is below a certain threshold it will pre-resize the image before displaying it (and hopefully better).

At mono displays Nova3d uses 3pixels in rgb channels
photo_2021-02-07_22-24-58

DOH, now that i zoomed in an image the RGB is pretty obvious.
I will try to implement the decoding and see if it does not hog the cpu (I don't think java is ideal for this task).

Java does it very quick

you can use part of my code for that

` private static void pix2RGB(String fileName) {
try {
File file = new File(fileName);
BufferedImage source = ImageIO.read(file);
// Создаем новое пустое изображение, сжатое по короткой стороне в 3 раза
BufferedImage result = new BufferedImage(source.getWidth()/3, source.getHeight(), BufferedImage.TYPE_INT_RGB);

             // Делаем двойной цикл, чтобы обработать каждый пиксель
             int widthMax = source.getWidth()/3*3;
             for (int x = 0; x < widthMax; x = x + 3) {
                  for (int y = 0; y < source.getHeight(); y++) {

                    int pix1 = source.getRGB(x  , y)& 0xff;
                    int pix2 = source.getRGB(x+1, y)& 0xff;
                    int pix3 = source.getRGB(x+2, y)& 0xff;

                    Color newColor = new Color(pix3, pix2, pix1);

                    result.setRGB(x/3, y, newColor.getRGB());
                  }
             }

            // Сохраняем результат в тот же файл
            File output = new File(fileName);
            ImageIO.write(result, "png", output);

            } catch (IOException e) {

                // При открытии и сохранении файлов, может произойти неожиданный случай.
                // И на этот случай у нас try catch
                System.out.println("File not found or file error");
            }

    }`

для этого можно использовать часть моего кода

Приветик! А поделитесь, если это возможно, полным кодом.
У меня есть такая матрица с HDMI, и я хочу попробовать засвечивать фоторезист для изготовления печатных плат в домашних условиях, и для меня было полной неожиданностью что картинку так просто не выведешь на дисплей.