문제

I have the image data as QByteArray. I want to load the texture of this image from that data using libpng. Everywhere I see reading the image texture from the file or from input stream. But how can I load the image from the QByteArray?? Thanks.

도움이 되었습니까?

해결책

I found what I wanted in here The png_read_from_mem (png_structp png_ptr, png_bytep data, png_size_t length)' method was exactly what I was looking for. It reads data which isunsigned char*`.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top