imgur

Three.js and loading a cross-domain image

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know this has been asked before, and I've read ever question and answer I've been able to find, but nothing works. I'm running this on a local server (IIS). I'm trying to load an image from imgur and then use that as texture for an object using the code: var savedImage = /[^?]*$/.exec(location.search)[0]; if (savedImage != "") { savedImageLoad("http://i.imgur.com/" + savedImage + ".jpg"); }; function savedImageLoad(image) { var mapOverlay = new THREE.ImageUtils.loadTexture(image); sphere.material = new THREE.MeshBasicMaterial({map:

Three.js and loading a cross-domain image

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know this has been asked before, and I've read ever question and answer I've been able to find, but nothing works. I'm running this on a local server (IIS). I'm trying to load an image from imgur and then use that as texture for an object using the code: var savedImage = /[^?]*$/.exec(location.search)[0]; if (savedImage != "") { savedImageLoad("http://i.imgur.com/" + savedImage + ".jpg"); }; function savedImageLoad(image) { var mapOverlay = new THREE.ImageUtils.loadTexture(image); sphere.material = new THREE.MeshBasicMaterial({map:

IE9 refuses to process XML response

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is a question in relation to this one . In UPDATE II , I added a script based on Jamie's feedback. UPDATE - tl;dr : I created a fiddle with a temporary key so you guys can see the problem more easily: http://jsfiddle.net/S6wEN/ . As this question was getting too long, this is a summary. I tried to use imgur API to update an image via cross domain XHR. In order to abstract details in the implementation, I'm using Jquery Form Plugin (obviously, it's contained in the fiddle). Works great in Chrome, Firefox, etc but it doesn't work in IE9.

Display image on hover, centered in the background

匿名 (未验证) 提交于 2019-12-03 00:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I went through a number of questions regarding displaying image on hover here on Stackoverflow, but couldn't find a solution for my problem. Right now I managed to display an image in the background of the paragraph once I hover on it. See on JSFiddle. Ideally what would I like to do achieve: once I hover over an Example1 inside of a paragraph I would like to display Image1 in the background, not below the paragraph, but centered in the background, below all of the elements. As pictured here . Hovering on Example2 would ideally display

Imgur API Version 3 JavaScript upload example

无人久伴 提交于 2019-12-02 16:24:12
All the examples I find online are of earlier versions of the Imgur API or non JS code all of which uses an API key which doesn't exist in the newer API. Instead you get a client_id and secret . Anyone have example code that shows how an image can be uploaded to Imgur through JavaScript (or jQuery) using version 3 of their API? $.ajax({ url: 'https://api.imgur.com/3/image', headers: { 'Authorization': 'Client-ID YOUR_CLIENT_ID' }, type: 'POST', data: { 'image': 'helloworld.jpg' }, success: function() { console.log('cool'); } }); 来源: https://stackoverflow.com/questions/18088493/imgur-api

Using jQuery to parse XML returned from PHP script (imgur.com API)

不羁的心 提交于 2019-12-01 12:40:12
Here's my jQuery: var docname = $('#doc').val(); function parseXml(xml) { $(xml).find("rsp").each(function() { alert("success"); }); } $('#submit').click(function() { $.ajax({ type: "GET", url: "img_upload.php", data: "doc=" + docname, dataType: "xml", success: parseXml }); return false; }); Note that #doc is the id of a form text input box and #submit is the submit button's id. If successful, I'd like a simple "success" javascript popup to appear. Here's img_upload.php with my API key omitted: <?php $filename = $_GET["doc"]; $handle = fopen($filename, "r"); $data = fread($handle, filesize(

Using jQuery to parse XML returned from PHP script (imgur.com API)

人盡茶涼 提交于 2019-12-01 11:41:29
问题 Here's my jQuery: var docname = $('#doc').val(); function parseXml(xml) { $(xml).find("rsp").each(function() { alert("success"); }); } $('#submit').click(function() { $.ajax({ type: "GET", url: "img_upload.php", data: "doc=" + docname, dataType: "xml", success: parseXml }); return false; }); Note that #doc is the id of a form text input box and #submit is the submit button's id. If successful, I'd like a simple "success" javascript popup to appear. Here's img_upload.php with my API key

Android, uploading a photo to host on imgur programatically

怎甘沉沦 提交于 2019-12-01 05:58:39
I have tried different methods to upload and retrieve a link via imgur but none have been successfull despite looking at the imgur api. http://api.imgur.com/examples#uploading_java But the following methods partly works.. im trying to retrieve, errors: if any errors occured. link to image: the link to the image hosted delete link: the link to delete the image hosted But i only end up with the "delete link", as the others are blank, check it out: public void post(String path) { List<NameValuePair> postContent = new ArrayList<NameValuePair>(2); postContent.add(new BasicNameValuePair("key", DEV

using imgur api v3 to upload images anonymously using php

只愿长相守 提交于 2019-11-29 21:53:26
I am planning to upload images to imgur anonymously using its api, i registered my application in the anonymous upload category and got client id and client secret, How to use php to upload image to imgur and retrieve direct url to the image? can anyone suggest links to any example? this is what I have tried to do but i get the error "Fatal error: Maximum execution time of 30 seconds exceeded" <?php $client_id = :client_id; //put your api key here $filename = "images/q401x74ua3402.jpg"; $handle = fopen($filename, "r"); $data = fread($handle, filesize($filename)); //$data is file data $pvars =

Upload image to imgur failed because of cors

梦想的初衷 提交于 2019-11-29 16:57:36
I'm trying to upload an image to imgur with js (browser) and get a CORS error: Access to XMLHttpRequest at 'https://api.imgur.com/3/upload' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. But preflight request contains Access-Control-Allow-Origin header: The request itself: What I'm missing? this is because access-control-allow-credentials set to true ? The problem was with their API Docs :\ The URL is: https://api.imgur.com/3/image and not https://api.imgur.com/3/upload as said here: https:/