Closed Bk8 closed 1 month ago
lunasvg default pixel format is ARGB Premultiplied alpha
Thank you!
Also the width and height of the document was different to the bitmap.
I changed this: int height = document->height(); int width = document->width(); to this: int height = bitmap.height(); int width =bitmap.width();
It worked but it's this ok? why are this values different in the document and the bitmap?
why are this values different in the document and the bitmap?
Document::width
Returns the width of the document as specified in the file
Document::height
Returns the height of the document as specified in the file
Bitmap::width
Returns the width of the rendered document
Bitmap::height
Returns the height of the rendered document
Document::renderToBitmap
can return a 'Bitmap' size that is different from the 'Document' size
So use this to be safe while handling Bitmap
int height = bitmap.height();
int width = bitmap.width()
I'm trying to integrate the lunasvg to a juce project, but I'm getting a weird behavior while trying to set the pixels to the 2d array representation in Juce. The color seems ok but not the order of the pixels, could someone help me please? The image renders corrrectly with the png demo.
`