首页 \ 问答 \ UIImage UIImageJPEGRepresentation对UIImage安全(UIImage UIImageJPEGRepresentation safe to UIImage)

UIImage UIImageJPEGRepresentation对UIImage安全(UIImage UIImageJPEGRepresentation safe to UIImage)

我需要执行UIImageJPEGRepresentation方法,之后将其保存到文件中,我需要将其保存到UIImage。 请帮助..


I need to perform UIImageJPEGRepresentation method and after that save it NOT to file, I need to save it to UIImage. Help please..


原文:https://stackoverflow.com/questions/6776245
更新时间:2023-03-08 15:03

最满意答案

ButtonDrawable设置为null ,将BackgroundDrawable为资源。


Setting the ButtonDrawable on null and the BackgroundDrawable to resource worked.

相关问答

更多
  • 使用以下代码: public void find_cb() { LinearLayout ll_checkbox = (LinearLayout) findViewById(R.id.ll_checkbox); CheckBox cb1 = (CheckBox) ll_checkbox.findViewById(cb_id); String content = cb1.getText().toString(); } use following code: public voi ...
  • 我在这里工作了 。 在找到错误之前(除了各种语法错误)之外,我对代码进行了很多更改/次要修复: 您使用.width和.height而不是.style.width和.style.height ,并且您将整数应用于这些而不是附加了“px”的字符串。 这两件事都完全可以理解。 我还将onresize从body标签移动到JS中,不知道为什么它不能用于jsfiddle,但这仍然是很好的做法。 将来:学习如何使用控制台调试JS,当您提出问题时,请使用小示例,而不是整个代码库。 这个问题本来可以简化为“如何调整div的大 ...
  • 我到达这里是为了寻找CheckBox的文本而不是Drawable,并且我通过另一种方式找到解决方案。 但是,嘿! 让我分享解决未来的自己的问题。 代替: CheckBox cb = new CheckBox(this, null, R.style.yourstyle); 使用: CheckBox cb = new CheckBox(this); cb.setTextAppearance(this, R.style.yourstyle); 希望它有助于解决问题的主题! I've arrived here ...
  • 我解决了我的问题。 原来这是一个订购问题。 问题是我在将按钮添加到表格之前设置了高度。 这导致按钮的LayoutParams没有任何父项,如下所述: ViewGroup.getLayoutParams() 。 这是我需要做的事情(基本上, 在将按钮添加到表格后更改高度): table.addView(row,new TableLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); //now c ...
  • 是的你需要像这样使用, CGFloat lCurrentHeight = [[UIScreen mainScreen] bounds].size.height; //it will give 568 CGFloat lCurrentHeight = self.view.bounds.size.height;//it will give 548,in your case that condition failed. yes you need to use like this, CGFloat lCurre ...
  • 将ButtonDrawable设置为null ,将BackgroundDrawable为资源。 Setting the ButtonDrawable on null and the BackgroundDrawable to resource worked.
  • 使用removeAttr : $("input[value='1']:checked").removeAttr('checked'); 或者使用最新版本的jQuery,你可以使用prop : $("input[value='1']:checked").prop('checked', false); Use removeAttr: $("input[value='1']:checked").removeAttr('checked'); Or with recent versions of jQuery, ...
  • 这是预期的行为。 如果您的层次结构是widget -> layout -> widget -> layout -> ...窗口小部件将仅调整大小以适应可用空间。 目前你有ApplicationWindow (QMainWindow) -> QMainWindow layout (internally created by Qt) -> main_widget (QWidget) -> viewsStack (QStackedWidget) 最后一层在QWidget中有QWidget没有布局的QWidget ...
  • 你可能有一个选择器问题:我检查返回的jQuery对象的长度是不是0.这是我通常使用的: 编辑:正如@nbrooks指出的那样:input已被弃用。 这可能有效: $('#comment-form-subscribe').find('[type="checkbox"]').not(':checked').prop("checked", true); You might have a selector issue: I'd check that the length of the jQuery object ...
  • 不,我不认为只有使用html / css才有办法。 您可以制作覆盖(div),将其置于复选框的正上方并使其可见。 使用此叠加层,您可以添加自己的复选框图形,并在用户单击图像时更改其图像(= 可见值 )。 Furhtermore您必须手动更新实际复选框的值,以确保可以发送包含复选框的表单值的表单 。 RIA框架经常使用这种技术,如QooxDoo,ExtJS等。 在这里你会发现一个如何使用描述技术的非常好的例子。 No, i don't think there's a way of doing it by on ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)