Open
Description
I write a simple program in c++ to quickly dive into Blaze. But the image I got is broken.
Here is how it looks like:
I guess something was wrong with the multi-threading, but I can't figure out why.
Further information:
Cmakelists:
Load vectorimage:
// static VectorImage g_vectorImage;
g_vectorImage.Parse(reinterpret_cast<const uint8 *>(buffer), size);
Update image:
int fw, fh;
glfwGetFramebufferSize(window, &fw, &fh); // Fill the window.
g_image.UpdateSize({fw, fh});
g_image.ClearImage();
g_image.DrawImage(g_vectorImage, Matrix::Identity);
I use stbi_write_png to save the output:
// static DestinationImage<TileDescriptor_16x8> g_image;
const int imgw = g_image.GetImageWidth();
const int imgh = g_image.GetImageHeight();
const uint8_t *data = g_image.GetImageData();
stbi_write_png("Tiger_out.png", imgw, imgh, 4, data, 4 * imgw);
Metadata
Assignees
Labels
No labels