--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
thank you for quick answer. yes l did build with my minimal needs for ubuntu x86 like this.
bin/gn gen out/x86 --args='is_official_build=false is_debug=false cc="clang" cxx="clang++" target_cpu="x86" target_os="linux" skia_use_libwebp=false skia_use_fontconfig=false skia_use_system_freetype2=false skia_use_egl=false skia_use_lua=false skia_use_libpng=false skia_use_vulkan=false skia_enable_pdf=false skia_use_sfntly=false skia_enable_tools=false skia_use_angle=false skia_use_dng_sdk=false'
when l finish my code l will compile for arm and build my code.
l try write my code but l thinks some tings wrong, l try read jpeg data and writ text over it , for test trying l write to file jpeg file is 0 kb.
void drawText(void* pData)
{
VIDEO_EVENT* vidEvent;
vidData = (VIDEO_EVENT*) pData;
sk_sp<SkData> data = SkData::MakeWithCString(pData->buff);
sk_sp<SkImage> img = SkImage::MakeFromEncoded(data);
SkBitmap bitmap;
bitmap.setInfo(SkImageInfo::Make(pData->width, pData->height, kRGBA_8888_SkColorType, kOpaque_SkAlphaType),0);
SkCanvas canvas(bitmap);
canvas.drawImage(img, 100, 50);
SkPaint paint;
SkString string("hello");
canvas.drawString(string, 20, 20, paint);
sk_sp<SkData> encoded = SkEncodeBitmap(bitmap, SkEncodedImageFormat::kJPEG, 100);
// l need put back jpeg data to pData->buff and set pData->size
// for test l write image to file but its write 0 kb.
FILE* pFile = fopen("/home/user/pics/j19.jpg", "wb+");
if (!pFile) {
fprintf(stderr, "The file '%s' was not opened\n", "j17.jpg");
return;
}
fwrite(encoded->data(), encoded->size(), 1, pFile);
fclose(pFile);
}
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.