Saving an image (jpg) on a remote server without local hard disk

 ̄綄美尐妖づ 提交于 2019-12-24 15:13:55

问题


I have a linux app programmed in C which uses gdk for image stuff. The images are sent to a remote server through FTP (with libcurl).

Currently I'm saving the images first to a local hard disk with gdk_pixbuf_save, but this seems kinda useless step. How difficult would it be to save the images directly on the remote server? I would also need to use the quality setting of jpg.


回答1:


There is a gdk_pixbuf_save_to_buffer that can store data to a gchar buffer.

I wasn't able to quickly find the CURL API associated with FTP put requests; hopefully you'll be familiar enough with CURL to know how to put a file using a buffer as contents.



来源:https://stackoverflow.com/questions/9370468/saving-an-image-jpg-on-a-remote-server-without-local-hard-disk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!