问题标签 [imagedownload]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3965 浏览

php - 通过 php curl 或 file_get_content 下载图片

我正在尝试从here

上面的 url 同时使用 php curl 和 file_get_content。但是当我使用 php curl 时,图像已下载但没有内容,当我使用file_get_content时出现以下错误,

Warning: file_get_contents(http://s3.amazonaws.com/test_bucket/test_12_12_2013_10_51_00.jpg) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 505 HTTP Version Not Supported in /home/webdev/public_html/example/photos/download.php on line 11

0 投票
2 回答
2134 浏览

android - 从 Android 中的服务器下载时出现 90 度倾斜的图像?

处理我们捕获图像并通过服务器上传的应用程序。应用程序在 Android 和 I Phone中。当我们从 Android 发布图像时,它们的数量以千字节为单位,但当我们从 I Phone 发布图像时,它们的大小为 MB。

当我们从 IPHONE 5 发布的带有 URL 的图像在浏览器上显示时,它们看起来不错,但是当我们在 Android 设备中下载该图像并在图像视图中显示时,它们看起来向左侧倾斜 90 度。

在 Android 或 I Phone 中下载图像后,我没有使用任何旋转代码。

在 I Phone 中,图像看起来很好。

从 Android 捕获的图像也可以直接看到。从 I Phone 捕获的低分辨率图像在 Android 中也可以直接看到。

从安卓上传的图片:

从我手机上传的图片:

请给我建议。

0 投票
1 回答
220 浏览

.net - .NET Parallel Task.Factory.StartNew 在大约 40 次图像下载后不起作用

我有一个 Winform 应用程序。单击 button2 后,应用程序将开始下载大量图像,其 url 存储在 ThousandsOfImageURLs 列表中。该应用程序适用于前 40 个图像下载。但是之后,函数 ParallelRunBrowser 中的 Task.Factory.StartNew 无法启动 RunBrowserThread。我可以看到每 10 秒 Task.Factory.StartNew 被击中,但在下载大约 40 张图像后,DownLoadImages 类的 RunBrowserThread 内的断点无法再被击中。我没有看到以这种方式在几个小时内抛出任何异常。

可能的问题是什么?

谢谢,

0 投票
1 回答
5842 浏览

java - Jersey REST 服务以带有下载窗口的图像返回响应

我有一个D3在客户端生成的图表。我将SVG数据发送到JerseyREST 服务SVGOutputStream使用Transcoding. 当我从服务返回响应时,我可以在控制台中看到以二进制流形式返回的数据。

我想要的是一个浏览器下载窗口,一旦服务返回响应就会弹出。

以下是代码片段:

调用此服务后,我会Exception在服务器控制台上进行以下操作:

我想我错过了一些泽西岛的依赖。

任何指针都受到高度赞赏。提前致谢。

0 投票
1 回答
3328 浏览

android - 毕加索大图下载

我阅读了有关 Picasso 图像下载库的信息,但有一个问题我无法解决。是大图下载。当我有大图像时,即 2000 x 1920 它被压碎(内存不足)。

我该如何解决这个问题?

Picasso.with(context).load(myUrl).into(imageView);

0 投票
2 回答
3028 浏览

php - 无需在 PHP 中下载即可获取图像尺寸

其他语言已经回答了这个问题,
但我想知道 - 是否有 PHP 解决方案如何在不下载整个文件或根本不下载的情况下从图像 URL 获取图像的尺寸?

0 投票
1 回答
194 浏览

android - android不断从网络服务器下载图像

我想每 1 秒从网络服务器下载一张图片。有人能告诉我实现这一目标的最佳方法吗?目前,我正在考虑使用 Executer 类,但我不确定这是否是更好的方法。请帮我。

0 投票
1 回答
248 浏览

java - 安卓下载图片

我正在尝试不断地从 Web 服务器下载图像。下面显示的是代码

图像下载器类的代码

htppcommunicator 类的代码

这段代码只运行了 1 分钟,然后它抛出了下面显示的异常

我不知道如何解决这个问题。请帮我。

0 投票
0 回答
805 浏览

ios - SDImageCache Memory Usage

I am using SDWebImageDownloader in my iOS 7 app to download images from the web. I am not using SDWebImageManager, only the downloader, which is not supposed to cache anything on my behalf.

As more and more images are downloaded, my apps memory usage slowly climbs up and up approaching 100 MB with no end in sight. This memory is never freed up, and occurs even when nothing is saved to the cache. As such, it makes me think the downloaded images are being held in memory by SDWebImageDownloader somehow. Does anyone know how to clear this memory?

UPDATE My assumption that the issue was due to the SDImageDownloader was incorrect. Every time an image downloaded, I converted the image to a smaller size, and stored that image in SDImageCache. I had ruled out SDImageCache because I had attempted to regularly clear the memory cache, which had no effect on the memory climbing. However, I just deleted the line that calls it, and no more memory problem.

This leads me to a new question: How do I use SDImageCache without the memory climbing so high? I have no need for the memory cache functionality, just the disk caching functionality. However, there does not seem to be a way to clear the memory cache, and the disk cache seems to be taking up way more memory than the reduced sized images would take up otherwise. Where is this memory usage coming from?

0 投票
0 回答
45 浏览

java-me - 将 ContainerList 与 ImageDownloadService 一起使用

我在这里指的是这段代码。这满足了我的需要,但我需要在 2 列而不是 1 列中显示内容。因此,我想到了使用带有网格布局的 ContainerList。这里的问题是boolean initListModel(List cmp)容器列表没有被调用。

我还尝试动态添加 ContainerList,但在将它与 ImageDownloadService 一起使用时遇到问题,就像在 List 的情况下使用它的方式一样。如果有人能给我提供任何示例代码来相处,那就太好了