[Spice-devel] how to open jpg binary file (/tmp/spice_dump/x.jpg)?
谢 昆明
KunMing.Xie at hotmail.com
Wed Jun 20 02:14:54 UTC 2018
Hey guys. I have dump some jpg file, but I can’t open it with eog.
static int jpeg_id = 0;
static void dump_jpeg(uint8_t* data, int data_size)
{
char file_str[200];
uint32_t id = ++jpeg_id;
#ifdef WIN32
sprintf(file_str, "c:\\tmp\\spice_dump\\%u.jpg", id);
#else
sprintf(file_str, "/tmp/spice_dump/%u.jpg", id);
#endif
FILE *f = fopen(file_str, "wb");
if (!f) {
return;
}
fwrite(data, 1, data_size, f);
fclose(f);
}
发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180620/c952fd9f/attachment.html>
More information about the Spice-devel
mailing list