在没有本地硬盘的远程服务器上保存图像(jpg) [英] Saving an image (jpg) on a remote server without local hard disk

查看:102
本文介绍了在没有本地硬盘的远程服务器上保存图像(jpg)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C编程的Linux应用程序,它使用gdk来存储图像.图像通过FTP(带有libcurl)发送到远程服务器.

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).

当前,我首先使用gdk_pixbuf_save将图像保存到本地硬盘上,但这似乎是一个无用的步骤.直接将图像保存在远程服务器上有多困难?我还需要使用jpg的质量设置.

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.

推荐答案

有一个我无法快速找到与FTP put请求关联的CURL API;希望您对CURL足够熟悉,以了解如何使用缓冲区作为内容来put文件.

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.

这篇关于在没有本地硬盘的远程服务器上保存图像(jpg)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆