Tag: 图像

多个图像上传PHP表单与一个input

我一直在努力使这项工作相当长一段时间。 但我似乎无法使其工作。 我想要一个多图像上传forms只使用一个input。 这是我的upload.php <?php include("../include/session.php"); session_start(); $allowedExts = array("jpeg", "jpg", "png", "gif"); $extension = end(explode(".", $_FILES["upload"]["name"])); if(isset($_FILES['upload']['tmp_name'])) { for($i=0; $i < count($_FILES['upload']['tmp_name']);$i++) { if (($_FILES["upload"]["name"] < 90000000000000000) && in_array($extension, $allowedExts)) { if ($_FILES["upload"]["error"] > 0) { header('location: '.$error); die; } else { if (file_exists("../icons/".$_SESSION["username"] ."/" . $_FILES["upload"]["name"])) { echo "error"; } else { if(!is_dir("../icons/". […]

将base64string转换为Java中的Image

我有一个图像通过JSONstring发送给我。 我想在我的android应用程序中将该string转换为图像,然后显示该图像。 JSONstring如下所示: "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVI…" 注意:我用…截断了string 我有一个函数(我认为)将string转换为图像。 我做对了吗? public Bitmap ConvertToImage(String image){ try{ InputStream stream = new ByteArrayInputStream(image.getBytes()); Bitmap bitmap = BitmapFactory.decodeStream(stream); return bitmap; } catch (Exception e) { return null; } } 然后我尝试在我的Android活动中显示它 String image = jsonObject.getString("barcode_img"); Bitmap myBitmap = this.ConvertToImage(image); ImageView cimg = (ImageView)findViewById(R.id.imageView1); //Now try setting dynamic image cimg.setImageBitmap(myBitmap); 但是,当我这样做,没有出现。 我不会在logcat中出现任何错误。 我究竟做错了什么? 谢谢

以编程方式将图像添加到RTF文档

我正在尝试将图像添加到正在创build的RTF文档中。 我宁愿不使用清除剪贴板的“复制/粘贴”方法(涉及在RichTextBox中粘贴图像,然后访问.RTF属性)(因为这对我的最终用户来说是一个麻烦和困惑)。 我到目前为止的代码返回需要被插入到RTF文档来打印图像的string。 input的图像(位于$path)通常是BMP或JPEG格式,但在这个阶段,我不关心如何将图像存储在RTF中,只有我可以得到它的工作。 public string GetImage(string path, int width, int height) { MemoryStream stream = new MemoryStream(); string newPath = Path.Combine(Environment.CurrentDirectory, path); Image img = Image.FromFile(newPath); img.Save(stream, System.Drawing.Imaging.ImageFormat.Png); byte [] bytes = stream.ToArray(); string str = BitConverter.ToString(bytes, 0).Replace("-", string.Empty); //string str = System.Text.Encoding.UTF8.GetString(bytes); string mpic = @"{\pict\pngblip\picw" + img.Width.ToString() + @"\pich" + img.Height.ToString() + […]

我可以使用Facebook API设置用户个人资料图片吗?

我正在寻找一个user.setImage调用或在Facebook API上的效果,但我不能看到任何东西来实现这个目的:专门覆盖用户的个人资料图像(不只是发布在他们的墙上的图像)。 我无法看到文档中的任何内容。 你知道这是可能的,如果是这样的文档实施呢?

C#Base64string到JPEG图像

我正在尝试将Base64String转换为需要在本地保存的图像。 目前,我的代码能够保存图像,但是当我打开保存的图像,它说“无效的图像”。 码: try { using (var imageFile = new StreamWriter(filePath)) { imageFile.Write(resizeImage.Content); imageFile.Close(); } } Content是一个包含Base64string的string对象。

如何让浏览器caching图片,用PHP?

我是如何caching图像全新的。 我用php输出图库中的所有图像,并希望已经显示的图像被浏览器caching,所以php脚本不必再输出相同的图像。 我想要的是图像显示更快。 当调用图像我喜欢这样: <img src="showImage.php?id=601"> 和showImage.php文件做: $resultat = mysql_query(" SELECT filename, id FROM Media WHERE id = '".$_GET['id']."' "); $data = mysql_fetch_assoc($resultat); … //Only if the user are logged in if(isset($_SESSION['user'])){ header("Content-Type: image/jpeg"); //$data['filename'] can be = dsSGKLMsgKkD3325J.jpg echo(file_get_contents("images/".$data['filename']."")); }

跨浏览器的方式来使用CSS旋转图像?

我有一个网站布局,我正在工作,有一个主要的内容区域,然后在内容区域的四个angular落的每一个angular落的graphics。 整体效果是桌面记事本的效果。 这是我的左上angular的代码: .corner-top-left { width:96px ; height:96px ; background:url("images/corner.png") no-repeat ; position:absolute ; top:-5px ; left:-5px ; z-index:3000 ; } 而不是做四个angular落的图像,我想要做的(如果可能)是使用原始图像(corner.png),并使用CSS旋转它。 有没有一个跨浏览器兼容的方式来做到这一点? 非常感谢!

在Chrome / IE9中删除图片边框

我试图摆脱Chrome和IE9中出现的每个图像的薄边框。 我有这个CSS: outline: none; border: none; 使用jQuery,我还在每个图片标签上添加了border=0属性。 但图像中显示的边框仍然显示。 任何解决scheme body { font: 10px "segoe ui",Verdana,Arial,sans-serif, "Trebuchet MS", "Lucida Grande", Lucida, sans-serif; } img, a img { outline: none; border: none; } .icon { width: 16px; height: 16px; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; background-position: -48px -144px; background-image: url(themehttp://img.dovov.comui-icons_0078ae_256x240.png); margin-right: 2px; display: inline-block; position: relative; top: […]

更改iPhone UISlider栏图像

我在我的应用程序中使用UISlider ,但是我想使用自定义的“外观”。 我已经改变了拇指到我自己的形象,但有没有办法改变吧? 我有一个我想要使用的酒吧形象,但不能看到如何做到这一点。 我发现如何改变最大和最小图像,但不是酒吧本身。

在PHP中将JPG / GIF图像转换为PNG?

可能重复的 使用PHP将jpg图像转换为gif,png和bmp格式 我有一个PHP表单,允许图像上传和检查exif_imagetype(); 确保图像有效。 但是,我希望所有的格式,PNG,JPG,JPEG和GIF,最终被提交PNG。 我怎么能这样做?