mbrush icon indicating copy to clipboard operation
mbrush copied to clipboard

Image format documentation

Open jburdy opened this issue 4 years ago • 5 comments

Hi, Were are the documentation about requirements to upload image in the Princube ? We don't know how to create correct format (transparency, etc...). Thanks,

jburdy avatar May 23 '20 11:05 jburdy

As the API Document says, you need to call mbc.conv in /js/workers/mbc.js for image format conversion, convert png (which other formats may also support) to the private mbd format, then you can upload it to the printer. The mbd file names are numbers, starting from 0, uploads more than one file is a multi-line print.

Parameter density is recommended not to set it too high, around 50 is recommended. Other parameters can use default values.

dukelec avatar May 25 '20 08:05 dukelec

If you're just using this APP and not secondary development, you can use the APP to open almost any image format (GIF animations only show the first frame).

dukelec avatar May 26 '20 02:05 dukelec

Is there a way to call mbc.conv from outside the app? It would be very useful to be able to convert and upload images programmatically.

chonigman avatar Aug 24 '20 22:08 chonigman

@chonigman Yes, I just added instructions and demo code for you, please refer to the headless conversion in the dev document.

dukelec avatar Aug 25 '20 07:08 dukelec

@dukelec Amazing. Thank you so much.

chonigman avatar Aug 25 '20 16:08 chonigman