首页 \ 问答 \ 搜索低分辨率的大图像(Searching for large images made from a low resolution)

搜索低分辨率的大图像(Searching for large images made from a low resolution)

我在本地驱动器上有很多产品图片,我从不同的来源获得,其中一些图像搞砸了。 我说的是分辨率很高的图像,但很明显,这个分辨率是通过从非常小的来源调整图像大小来实现的。

是否有软件或某些东西可以找到这些通常高分辨率但质量低的图像? 谢谢你的任何想法。

来自小型源的放大图像的示例


I have many product images on my local drive that I got from different sources and some of them are messed up a bit. I'm talking about images that are large in resolution but it is apparent that this resolution has been achieved by resizing the image from a very small source.

Is there a software or something that could find these usualy high-res but low quality images? Thanks for any ideas.

Example of enlarged image from a small source


原文:https://stackoverflow.com/questions/45965998
更新时间:2022-05-02 08:05

最满意答案

问题不在于onload 。 您只是在存在之前访问该属性。

您永远不会在HomeView构造函数中设置this.el

$("body").html(this.el);
this.template = _.template($('#main-template').html());
this.render();

你正在调用this.render() ,它访问this.el.innerHTML ,但在这三行中你设置this.el ? 无处。

如果this.el应该由View设置,那么访问之前你必须调用父构造函数:

constructor() {
    super();
    $("body").html(this.el);
    this.template = _.template($('#main-template').html());

    this.render();
}

The problem is not with onload. You are simply accessing a property before it exists.

You are never setting this.el in your HomeView constructor:

$("body").html(this.el);
this.template = _.template($('#main-template').html());
this.render();

You are calling this.render(), which access this.el.innerHTML, but where in these three lines are you setting this.el? Nowhere.

If this.el supposed to be set by View, then you have to call the parent constructor before you access this:

constructor() {
    super();
    $("body").html(this.el);
    this.template = _.template($('#main-template').html());

    this.render();
}

相关问答

更多
  • 加载时间不一样,前者是页面打开的同时加载,或者是当页面加载完成之后在去加载效果,单页面小的时候,时间上看不出什么差别
  • window.onload和$(document).ready()之间的区别在jQuery教程中有解释 我引用: 大多数JavaScript程序员最终做的第一件事是为他们的程序添加一些代码,类似这样: window.onload = function(){ alert("welcome"); } 里面是你想在页面加载时运行的代码。 然而,问题是,直到所有图像完成下载(这包括横幅广告),Javascript代码才会运行。 首先使用window.onload的原因是,当您第一次尝试运行代码时,HTML“文档” ...
  • ready事件发生在HTML文档加载完成之后,当所有内容(例如图像)也被加载时,稍后会发生onload事件。 onload事件是DOM中的标准事件,而ready事件是特定于jQuery的事件。 ready事件的目的是在文档加载后尽可能早地发生,从而为页面中的元素添加功能的代码不必等待所有内容加载。 The ready event occurs after the HTML document has been loaded, while the onload event occurs later, when ...
  • 在window.onload运行某些内容可确保在函数运行之前加载所有DOM元素。 如果函数访问或修改DOM,则需要使用它。 christmasDayCalculation()和hockeyTeams()不访问DOM,因此不需要在window.onload运行它们。 当窗口加载时,你实际上并没有运行它们,因为你没有在它们周围放置function() 。 当你这样做 window.onload = hockeyTeams(); 它立即运行该函数,然后将它返回的值赋给window.onload 。 当你写作 w ...
  • 是的,你可以假设它将在浏览器中加载整个页面后执行 yes you can assume as it will get executed after entire page loaded in browser
  • 问题不在于onload 。 您只是在存在之前访问该属性。 您永远不会在HomeView构造函数中设置this.el : $("body").html(this.el); this.template = _.template($('#main-template').html()); this.render(); 你正在调用this.render() ,它访问this.el.innerHTML ,但在这三行中你设置this.el ? 无处。 如果this.el应该由View设置,那么在访问之前你必须调用父构造 ...
  • jsFiddle: https ://jsfiddle.net/CanvasCode/ouk7aatj/ 最后一个onload将被触发,所有以前的onload语句将被忽略 window.onload= function() { alert("Onload 1"); }; window.onload= function() { alert("Onload 2"); }; var i = 0; window.onload= function() { i = 10; alert(i); ...
  • page.open(url, function(status){...})只是另一种表示法 page.onLoadFinished = function(status){...}; page.open(url); 你可以在这里找到报价: 另请参阅WebPage #open以获取onLoadFinished回调的备用挂钩。 由于这是一个基于AJAX的页面,您需要等待数据出现。 您只能通过反复检查页面的特定部分来实现。 您可以在phantomjs 安装的示例目录中找到示例或此处 。 这可能也适用于通过npm- ...
  • 如果您的JavaScript代码低于DOM元素并且仅以独占方式修改它们,则无需等待DOM ready事件。 但是,请记住编辑一个DOM元素,该元素包含一个script元素(或更具体地说,在元素的结束标记之前),用于在IE6(感谢TJ Crowder )和IE7中引起大问题 。 但是,这需要内联scripts ,这可能是一个维护问题。 最好让你的JavaScript存储在外部(很多人都会谈到在关闭body标签之前包含它们的好处),以获得诸如易于维护和细粒度缓存控制等诸多好处。 If your JavaScri ...
  • 虽然我认为@ jAndy的答案是正确的,但你可以通过在ready()调用中将代码放在onload来为自己提供一些额外的保证。 只需确保您的主要ready()调用是第一位的。 $(document).ready(function() { // Your normal ready handler }); $(window).load(function() { // Placing code in another .ready() call in here will add it to the ...

相关文章

更多

最新问答

更多
  • 您如何使用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)