How to get the best resolution of image from srcset

I have an image code with srcset and sizes like this:

    <img src="/uploads/2012/12/Multitronics-TC-750-300x175.jpg"  class="attachment-medium size-medium wp-post-image lazyloaded"  alt="Multitronics TC 750"  srcset="/uploads/2012/12/Multitronics-TC-750-300x175.jpg 300w, /uploads/2012/12/Multitronics-TC-750-513x265.jpg 513w, /uploads/2012/12/Multitronics-TC-750.jpg 1260w"  sizes="(max-width: 300px) 100vw, 300px"> 

How to get the maximum image size (like Multitronics-TC-750.jpg 1260w) using the function? For example wp_calculate_image_srcset ()?

Image segmentation of a high resolution 2D binary image into clusters, threads and points

I use python3 to find out the proportion of the mentioned image features. They are originally 8-bit greyscale TIFF images with a resolution of 2048×2168 pixels. I have binarised it into an image composing of the matrix (white) and component particles (black). The particles have random morphologies. I would like to widely categorise them as:

  • Points which can range between 1×1 to 3×3 blocks of independent square pixels completely surrounded by the matrix
  • Threads which are linear or diagonal sets of continuous pixels of at least 3 pixels in length and at most 3 pixels in width
  • Clusters which are any randomly shaped closed morphologies with more than 10 pixels in overall area (or any arbitrary high value)
  • Others which by any chance is not included the three listed above

Here is an Example(400×400) portion of the image.

First of all, I am confused about the order of progress in this situation. I could scan the whole image pixel by pixel and extract the points in my first step. A second scanning can see for threads and final scanning can look for clusters using boundary tracing.

As you can see, the component is spread in a very uneven manner. To a human eye, the threads appear as blocks with very low aspect ration (AR). Points as noises and clusters as blocks of distinguishable larger areas. Therefore the accuracy level of this classification scheme does not needfully be a high score. The objective, however, is minimal user interaction (fully automatic). One another thing to note is that holes within clusters or threads (that does not break it) can be ignored. The ultimate aim is to get the area percentage of each of the objects so that the detection method can be limited keeping it in mind.

Some specific questions:

  1. Let us say that I identify a large cluster of pixels within the image. How can I split this into a surface (high AR) and thread (low AR)? (something similar to Watershed Algorithm)
  2. Should I go for the OpenCV contouring method like Border Following or border tracing (and later ignoring the holes) or something more suitable
  3. I was curious to know if there have been approaches in the past that used random sampling of pixels instead of a pixel by pixel scanning across the entire image.

I would like to know the steps a computer scientist would follow in such a scenario. I am a beginner in image processing and any reference material would be appreciated. For anybody interested in metallography, the images are micrographs and what we see are defects. I am trying to separate cracks, porosities and other openings based on pixel density.

General resolution in first order logic

Assuming you have a formula in first order logic like

$ $ (\forall_x p(x) \land \forall_x q(x)) \rightarrow \forall_x(p(x) \land q(x))$ $ (which seems valid?)

Converting the formula to CNF:

$ $ (\neg p(x) \vee \neg q(y) \vee p(z)) \land (\neg p(x) \vee \neg q(y) \vee q(z)) $ $

I don’t see how I can apply general resolution to get the empty clause in this case which puzzles me since I believe the formula is valid.

Unable to change screen resolution after trying to overclock nvidia graphics 1050ti

I was was trying to overclock my nvidia graphics card 1050ti but I was unable to. After restarting my pc my screen resolution is all messed up, all the icons and cursor are really big and i am unable to change the nouveau driver to nvidia driver. Image

I am also unable to change resolution of the screen through settings

-Ubuntu 18.04

-Nvidia 1050ti

-Amd ryzen 1600

Unity not resolving android dependencies and only returns resolution success

I just added some android plugins like in app purchase and advertisement and game analytics.

As i remember in previous installations unity downloaded many libraries for plugins on resolve. Now it only returns “resolution success” with no library added and it doeant work in final build.

Can any one tell what is the problem??

Ubuntu Server 18.04. DNS name resolution not working

I have a VM running Ubuntu 18.04, been working fine, but recently found I cannot update the server. Seems to be a DNS name resolution issue.

I have confirmed that DNS is working correctly, and there are not firewalls prohibiting correct name res.

I’ve seen some mention of name resolution bugs, but clearly as I cannot perform name resolution, I cannot update the server. Any help?

Original error with Apt update:

user001@server001:~$   sudo apt-get update sudo: unable to resolve host server001: Resource temporarily unavailable [sudo] password for user001: Err:1 bionic InRelease   Temporary failure resolving '' Err:2 bionic InRelease   Temporary failure resolving '' Err:3 bionic-security InRelease   Temporary failure resolving '' Err:4 bionic-updates InRelease   Temporary failure resolving '' Reading package lists... Done W: Failed to fetch  Temporary failure resolving '' W: Failed to fetch  Temporary failure resolving '' W: Failed to fetch  Temporary failure resolving '' W: Failed to fetch  Temporary failure resolving '' W: Some index files failed to download. They have been ignored, or old ones used instead. 

Name Resolution failing:

user001@server001:~$   ping ping: Temporary failure in name resolution user001@server001:~$   

NSLookup against same server works fine:

user001@server001:~$   nslookup > server Default server: Address: > Server: Address:  Non-authoritative answer: Name: Address: Name: Address: 2a00:1450:4009:818::2003 > exit 

Systemd-resolve output:

user001@server001:~$   systemd-resolve --status Global           DNSSEC NTA:                                                                                                                                                                                                                                                    corp                                    home                       internal                       intranet                       lan                       local                       private                       test  Link 2 (ens160)       Current Scopes: DNS        LLMNR setting: yes MulticastDNS setting: no       DNSSEC setting: no     DNSSEC supported: no          DNS Servers:              

Anyone able to suggest next steps?


Problem with portable ubuntu graphics driver and resolution

So I setup Ubuntu 16.04.5 LTS 64bit on an external HDD to use with both my home computer and laptop.

Home PC:

  • GTX 1660 Ti
  • AMD Ryzen 5 2600

Laptop: Macbook Pro (late 2013) with i5 processor and Intel Iris Graphics.

When setting up ubuntu I didn’t install any third party drivers since that was recommended on the guide I followed for portable setup.

Macbook works fine without any drivers, but on PC the monitor is shown as builtin display and I can’t change the resolution to anything other than 1024×768. I tried using xrandr for adding new modeline but it didn’t work saying the maximum resolution for the display is 1024×768.

So I installed nvidia driver (430.50) manually from Nvidia’s website and now ubuntu recognizes my monitor and I can change the resolution. But now it causes problem on Macbook.

When I boot it on Macbook after installing nvidia driver, after entering password on login screen, it gives a black screen and few seconds later returns to login screen.

Tried blacklisting nvidia driver when booting on Mac but it doesn’t work.

So I want to either:

  • Change the resolution on PC without nvidia driver
  • Use the nvidia driver on PC but disable it when booting on Mac

Been googling for two days but couldn’t find any solution that works.

Mouse movement between screens with different screen resolution

I’m looking for a way to resolve the scaling issues between different resolution monitors and moving the mouse between them.

When moving the mouse to the edge of the screen, it hits an invisible void instead of moving onto the next screen.

I’m using a Nvidia GTX1080Ti and the 430.50 driver.

The monitor layouts look like this (23″,27″,23″), (1080,2160,1080):

On Windows, I used to use LittleBigMouse but haven’t been able to find a suitable alternative for Linux.

How to simulate screen resolution realistically when testing responsive Web UI?

I have tried to test our Web page in different resolutions with two different approaches:

  • changing resolution on Web browser with Resolution Test extension for Chrome
  • simulating mobile devices with Device Mode in Chrome.

The page is rendered differently, depending on my approach. For instance, in device mode a page is zoomed out, e.g., font size seems to be adapted to the device resolution.

  1. Why does it happen? Based on what information (headers, etc.) Web application decides to render layout differently?

  2. Which approach is more realistic to evaluate layout for different resolutions on both mobile devices and standard laptop/desktop monitors?