1680244740

How to Calculate Pi By Counting Pixels

Happy Pi Day! Does counting pixels get you the circumference of a circle?

For Pi Day this year, I wanted to write a program to calculate pi by drawing a circle in FreeDOS graphics mode, then counting pixels to estimate the circumference. I naively assumed that this would give me an approximation of pi. I didn't expect to get 3.14, but I thought the value would be somewhat close to 3.0.

I was wrong. Estimating the circumference of a circle by counting the pixels required to draw it will give you the wrong result. No matter what resolution I tried, the final pi calculation of circumference divided by diameter was always around 2.8.

You can't count pixels to calculate pi

I wrote a FreeDOS program using OpenWatcom C that draws a circle to the screen, then counts the pixels that make up that circle. I wrote it in FreeDOS because DOS programs can easily enter graphics mode by using the OpenWatcom `_setvideomode` function. The `_VRES16COLOR` video mode puts the display into 640×480 resolution at 16 colors, a common "classic VGA" screen resolution. In the standard 16 color DOS palette, color 0 is black, color 1 is blue, color 7 is a low intensity white, and color 15 is a high intensity white.

In graphics mode, you can use the `_ellipse` function to draw an ellipse to the screen, from some starting x,y coordinate in the upper left to a final x,y coordinate in the lower right. If the height and width are the same, the ellipse is a circle. Note that in graphics mode, x and y count from zero, so the upper left corner is always 0,0.

(Jim Hall, CC BY-SA 4.0)

You can use the `_getpixel` function to get the color of a pixel at a specified x,y coordinate on the screen. To show the progress in my program, I also used the `_setpixel` function to paint a single pixel at any x,y on the screen. When the program found a pixel that defined the circle, I changed that pixel to bright white. For other pixels, I set the color to blue.

(Jim Hall, CC BY-SA 4.0)

With these graphics functions, you can write a program that draws a circle to the screen, then iterates over all the x,y coordinates of the circle to count the pixels. For any pixel that is color 7 (the color of the circle), add one to the pixel count. At the end, you can use the total pixel count as an estimate of the circumference:

``````#include <stdio.h>
#include <graph.h>

int
main()
{
unsigned long count;
int x, y;

/* draw a circle */

_setvideomode(_VRES16COLOR);         /* 640x480 */
_setcolor(7);                        /* white */
_ellipse(_GBORDER, 0, 0, 479, 479);

/* count pixels */

count = 0;

for (x = 0; x <= 479; x++) {
for (y = 0; y <= 479; y++) {
if (_getpixel(x, y) == 7) {
count++;
/* highlight the pixel */
_setcolor(15);                 /* br white */
_setpixel(x, y);
}
else {
/* highlight the pixel */
_setcolor(1);                  /* blue */
_setpixel(x, y);
}
}
}

/* done */

_setvideomode(_DEFAULTMODE);

printf("pixel count (circumference?) = %lu\n", count);
puts("diameter = 480");
printf("pi = c/d = %f\n", (double) count / 480.0);

return 0;
}``````

But counting pixels to determine the circumference underestimates the actual circumference of the circle. Because pi is the ratio of the circumference of a circle to its diameter, my pi calculation was noticeably lower than 3.14. I tried several video resolutions, and I always got a final result of about 2.8:

``````pixel count (circumference?) = 1356
diameter = 480
pi = c/d = 2.825000``````

You need to measure the distance between pixels to get pi

The problem with counting pixels to estimate the circumference is that the pixels are only a sample of a circular drawing. Pixels are discrete points in a grid, while a circle is a continuous drawing. To provide a better estimate of the circumference, you must measure the distance between pixels and use that total measurement for the circumference.

To update the program, you must write a function that calculates the distance between any two pixels: x0,y0 and x,y. You don't need a bunch of fancy math or algorithms here, just the knowledge that the OpenWatcom `_ellipse` function draws only solid pixels in the color you set for the circle. The function doesn't attempt to provide antialiasing by drawing nearby pixels in some intermediate color. That allows you to simplify the math. In a circle, pixels are always directly adjacent to one another: vertically, horizontally, or diagonally.

For pixels that are vertically or horizontally adjacent, the pixel "distance" is simple. It's a distance of 1.

For pixels that are diagonally adjacent, you can use the Pythagorean theorem of a²+b²=c² to calculate the distance between two diagonal pixels as the square root of 2, or approximately 1.414.

``````double
pixel_dist(int x0, int y0, int x, int y)
{
if (((x - x0) == 0) && ((y0 - y) == 1)) {
return 1.0;
}

if (((y0 - y) == 0) && ((x - x0) == 1)) {
return 1.0;
}

/* if ( ((y0-y)==1) && ((x-x0)==1) ) { */
return 1.414;
/* } */
}``````

I wrapped the last "if" statement in comments so you can see what the condition is supposed to represent.

To measure the circumference, we don't need to examine the entire circle. We can save a little time and effort by working on only the upper left quadrant. This also allows us to know the starting coordinate of the first pixel in the circle; we'll skip the first pixel at 0,239 and instead assume that as our first x0,y0 coordinate in measuring the quarter-circumference.

(Jim Hall, CC BY-SA 4.0)

The final program is similar to our "count the pixels" program, but instead measures the tiny distances between pixels in the upper left quadrant of the circle. You may notice that the program counts down the y coordinates, from 238 to 0. This accommodates the assumption that the known starting x0,y0 coordinate in the quarter-circle is 0,239. With that assumption, the program only needs to evaluate the y coordinates between 0 and 238. To estimate the total circumference of the circle, multiply the quarter-measurement by 4:

``````#include <stdio.h>
#include <graph.h>

double
pixel_dist(int x0, int y0, int x, int y)
{
...
}

int
main()
{
double circum;
int x, y;
int x0, y0;

/* draw a circle */

_setvideomode(_VRES16COLOR);         /* 640x480 */
_setcolor(7);                        /* white */
_ellipse(_GBORDER, 0, 0, 479, 479);

/* calculate circumference, use upper left quadrant only */

circum = 0.0;

x0 = 0;
y0 = 479 / 2;

for (x = 0; x <= 479 / 2; x++) {
for (y = (479 / 2) - 1; y >= 0; y--) {
if (_getpixel(x, y) == 7) {
circum += pixel_dist(x0, y0, x, y);

x0 = x;
y0 = y;

/* highlight the pixel */
_setcolor(15);                 /* br white */
_setpixel(x, y);
}
else {
/* highlight the pixel */
_setcolor(1);                  /* blue */
_setpixel(x, y);
}
}
}

circum *= 4.0;

/* done */

_setvideomode(_DEFAULTMODE);

printf("circumference = %f\n", circum);
puts("diameter = 480");
printf("pi = c/d = %f\n", circum / 480.0);

return 0;
}``````

This provides a better estimate of the circumference. It's still off by a bit, because measuring a circle using pixels is still a pretty rough approximation, but the final pi calculation is much closer to the expected value of 3.14:

``````circumference = 1583.840000
diameter = 480
pi = c/d = 3.299667``````

Original article source at: https://opensource.com/

1680223560

Как рассчитать Пи, считая пиксели

С Днем Пи! Подсчет пикселей дает вам длину окружности?

В этом году ко Дню Пи я хотел написать программу для вычисления числа Пи путем рисования круга в графическом режиме FreeDOS , а затем подсчета пикселей для оценки длины окружности. Я наивно полагал, что это даст мне приблизительное число пи. Я не ожидал получить 3,14, но думал, что значение будет близко к 3,0.

Я был неправ. Оценка окружности круга путем подсчета пикселей, необходимых для его рисования, даст неверный результат. Независимо от того, какое разрешение я пробовал, окончательный расчет пи длины окружности, деленной на диаметр, всегда был около 2,8.

Вы не можете считать пиксели, чтобы вычислить число пи

Я написал программу FreeDOS, используя OpenWatcom C, которая рисует круг на экране, а затем считает пиксели, составляющие этот круг. Я написал его в FreeDOS, потому что программы DOS могут легко войти в графический режим с помощью _setvideomodeфункции OpenWatcom. Видеорежим _VRES16COLORпереводит дисплей в разрешение 640 × 480 с 16 цветами, обычное «классическое разрешение экрана VGA». В стандартной 16-цветной палитре DOS цвет 0 — черный, цвет 1 — синий, цвет 7 — белый с низкой интенсивностью, а цвет 15 — белый с высокой интенсивностью.

В графическом режиме вы можете использовать эту _ellipseфункцию для рисования эллипса на экране от некоторой начальной координаты x,y в левом верхнем углу до конечной координаты x,y в правом нижнем углу. Если высота и ширина одинаковы, эллипс является окружностью. Обратите внимание, что в графическом режиме x и y отсчитываются от нуля, поэтому верхний левый угол всегда равен 0,0.

(Джим Холл, CC BY-SA 4.0)

Вы можете использовать эту _getpixelфункцию, чтобы получить цвет пикселя в указанной координате x, y на экране. Чтобы показать прогресс в моей программе, я также использовал _setpixelфункцию для рисования одного пикселя в любых x, y на экране. Когда программа нашла пиксель, определяющий круг, я изменил этот пиксель на ярко-белый. Для других пикселей я установил синий цвет.

(Джим Холл, CC BY-SA 4.0)

С помощью этих графических функций вы можете написать программу, которая рисует круг на экране, а затем перебирает все координаты круга x,y для подсчета пикселей. Для любого пикселя цвета 7 (цвета круга) добавьте единицу к количеству пикселей. В конце вы можете использовать общее количество пикселей в качестве оценки окружности:

``````#include <stdio.h>
#include <graph.h>

int
main()
{
unsigned long count;
int x, y;

/* draw a circle */

_setvideomode(_VRES16COLOR);         /* 640x480 */
_setcolor(7);                        /* white */
_ellipse(_GBORDER, 0, 0, 479, 479);

/* count pixels */

count = 0;

for (x = 0; x <= 479; x++) {
for (y = 0; y <= 479; y++) {
if (_getpixel(x, y) == 7) {
count++;
/* highlight the pixel */
_setcolor(15);                 /* br white */
_setpixel(x, y);
}
else {
/* highlight the pixel */
_setcolor(1);                  /* blue */
_setpixel(x, y);
}
}
}

/* done */

_setvideomode(_DEFAULTMODE);

printf("pixel count (circumference?) = %lu\n", count);
puts("diameter = 480");
printf("pi = c/d = %f\n", (double) count / 480.0);

return 0;
}``````

Но подсчет пикселей для определения окружности занижает реальную окружность круга. Поскольку пи — это отношение длины окружности к ее диаметру, мое вычисление числа пи было заметно ниже 3,14. Я пробовал несколько разрешений видео и всегда получал конечный результат около 2,8:

``````pixel count (circumference?) = 1356
diameter = 480
pi = c/d = 2.825000``````

Вам нужно измерить расстояние между пикселями, чтобы получить пи

Проблема с подсчетом пикселей для оценки окружности заключается в том, что пиксели являются лишь образцом кругового рисунка. Пиксели — это отдельные точки в сетке, а круг — это непрерывный рисунок. Чтобы обеспечить более точную оценку окружности, вы должны измерить расстояние между пикселями и использовать это общее значение для окружности.

Для обновления программы необходимо написать функцию, вычисляющую расстояние между любыми двумя пикселями: x0,y0 и x,y. Здесь вам не нужна куча причудливой математики или алгоритмов, просто знайте, что _ellipseфункция OpenWatcom рисует только сплошные пиксели того цвета, который вы установили для круга. Функция не пытается обеспечить сглаживание , рисуя близлежащие пиксели каким-либо промежуточным цветом. Это позволяет упростить математику. В круге пиксели всегда непосредственно примыкают друг к другу: по вертикали, горизонтали или диагонали.

Для пикселей, которые являются смежными по вертикали или горизонтали, «расстояние» пикселя простое. Это расстояние 1 .

Для пикселей, смежных по диагонали, вы можете использовать теорему Пифагора a²+b²=c², чтобы вычислить расстояние между двумя диагональными пикселями как квадратный корень из 2 или приблизительно 1,414 .

``````double
pixel_dist(int x0, int y0, int x, int y)
{
if (((x - x0) == 0) && ((y0 - y) == 1)) {
return 1.0;
}

if (((y0 - y) == 0) && ((x - x0) == 1)) {
return 1.0;
}

/* if ( ((y0-y)==1) && ((x-x0)==1) ) { */
return 1.414;
/* } */
}``````

Я обернул последнее выражение «если» в комментарии, чтобы вы могли видеть, что должно представлять условие.

Чтобы измерить окружность, нам не нужно исследовать весь круг. Мы можем сэкономить немного времени и сил, работая только с верхним левым квадрантом. Это также позволяет нам узнать начальную координату первого пикселя в круге; мы пропустим первый пиксель в 0,239 и вместо этого предположим, что это наша первая координата x0,y0 при измерении четверти окружности.

(Джим Холл, CC BY-SA 4.0)

Окончательная программа похожа на нашу программу «подсчет пикселей», но вместо этого измеряет крошечные расстояния между пикселями в верхнем левом квадранте круга. Вы можете заметить, что программа отсчитывает координаты y от 238 до 0. Это соответствует предположению, что известная начальная координата x0,y0 в четверти окружности равна 0,239. При таком предположении программе нужно только оценить координаты y в диапазоне от 0 до 238. Чтобы оценить общую длину окружности, умножьте четверть измерения на 4:

``````#include <stdio.h>
#include <graph.h>

double
pixel_dist(int x0, int y0, int x, int y)
{
...
}

int
main()
{
double circum;
int x, y;
int x0, y0;

/* draw a circle */

_setvideomode(_VRES16COLOR);         /* 640x480 */
_setcolor(7);                        /* white */
_ellipse(_GBORDER, 0, 0, 479, 479);

/* calculate circumference, use upper left quadrant only */

circum = 0.0;

x0 = 0;
y0 = 479 / 2;

for (x = 0; x <= 479 / 2; x++) {
for (y = (479 / 2) - 1; y >= 0; y--) {
if (_getpixel(x, y) == 7) {
circum += pixel_dist(x0, y0, x, y);

x0 = x;
y0 = y;

/* highlight the pixel */
_setcolor(15);                 /* br white */
_setpixel(x, y);
}
else {
/* highlight the pixel */
_setcolor(1);                  /* blue */
_setpixel(x, y);
}
}
}

circum *= 4.0;

/* done */

_setvideomode(_DEFAULTMODE);

printf("circumference = %f\n", circum);
puts("diameter = 480");
printf("pi = c/d = %f\n", circum / 480.0);

return 0;
}``````

Это обеспечивает лучшую оценку окружности. Это все еще немного отличается, потому что измерение круга с помощью пикселей по-прежнему является довольно грубым приближением, но окончательный расчет числа пи намного ближе к ожидаемому значению 3,14:

``````circumference = 1583.840000
diameter = 480
pi = c/d = 3.299667``````

Оригинальный источник статьи: https://opensource.com/

1680219840

你不能通过计算像素来计算圆周率

（吉姆·霍尔，CC BY-SA 4.0）

（吉姆·霍尔，CC BY-SA 4.0）

``````#include <stdio.h>
#include <graph.h>

int
main()
{
unsigned long count;
int x, y;

/* draw a circle */

_setvideomode(_VRES16COLOR);         /* 640x480 */
_setcolor(7);                        /* white */
_ellipse(_GBORDER, 0, 0, 479, 479);

/* count pixels */

count = 0;

for (x = 0; x <= 479; x++) {
for (y = 0; y <= 479; y++) {
if (_getpixel(x, y) == 7) {
count++;
/* highlight the pixel */
_setcolor(15);                 /* br white */
_setpixel(x, y);
}
else {
/* highlight the pixel */
_setcolor(1);                  /* blue */
_setpixel(x, y);
}
}
}

/* done */

_setvideomode(_DEFAULTMODE);

printf("pixel count (circumference?) = %lu\n", count);
puts("diameter = 480");
printf("pi = c/d = %f\n", (double) count / 480.0);

return 0;
}``````

``````pixel count (circumference?) = 1356
diameter = 480
pi = c/d = 2.825000``````

您需要测量像素之间的距离以获得 pi

``````double
pixel_dist(int x0, int y0, int x, int y)
{
if (((x - x0) == 0) && ((y0 - y) == 1)) {
return 1.0;
}

if (((y0 - y) == 0) && ((x - x0) == 1)) {
return 1.0;
}

/* if ( ((y0-y)==1) && ((x-x0)==1) ) { */
return 1.414;
/* } */
}``````

（吉姆·霍尔，CC BY-SA 4.0）

``````#include <stdio.h>
#include <graph.h>

double
pixel_dist(int x0, int y0, int x, int y)
{
...
}

int
main()
{
double circum;
int x, y;
int x0, y0;

/* draw a circle */

_setvideomode(_VRES16COLOR);         /* 640x480 */
_setcolor(7);                        /* white */
_ellipse(_GBORDER, 0, 0, 479, 479);

/* calculate circumference, use upper left quadrant only */

circum = 0.0;

x0 = 0;
y0 = 479 / 2;

for (x = 0; x <= 479 / 2; x++) {
for (y = (479 / 2) - 1; y >= 0; y--) {
if (_getpixel(x, y) == 7) {
circum += pixel_dist(x0, y0, x, y);

x0 = x;
y0 = y;

/* highlight the pixel */
_setcolor(15);                 /* br white */
_setpixel(x, y);
}
else {
/* highlight the pixel */
_setcolor(1);                  /* blue */
_setpixel(x, y);
}
}
}

circum *= 4.0;

/* done */

_setvideomode(_DEFAULTMODE);

printf("circumference = %f\n", circum);
puts("diameter = 480");
printf("pi = c/d = %f\n", circum / 480.0);

return 0;
}``````

``````circumference = 1583.840000
diameter = 480
pi = c/d = 3.299667``````

1678779240

🌈 🦕 get_pixels

Load and decode the pixels for a PNG or JPEG image in Deno

This module will take the raw data or URL of a PNG or JPEG image and return the decoded pixels and dimensions of the image.

Usage

``````import { getPixels } from "https://deno.land/x/get_pixels/mod.ts";

// From a URL
const { width, height, data } = await getPixels(
"http://placekitten.com/100/100",
);

// From a file

const { width, height, data } = await getPixels(file);
``````

There is also a `getFormat` function that will return the format of the image data. This is detected by the first magic bytes at the start of the data.

``````import { getFormat } from "https://deno.land/x/get_pixels/mod.ts";

const format = getFormat(file);
// format === "png"
``````

Author: ascorbic
Source Code: https://github.com/ascorbic/get-pixels

1664861880

MiniFB.jl

A Julia wrapper around MiniFB, a small cross platform library that makes it easy to render 32 bit pixels in a window.

Quick Start

``````using MiniFB

WIDTH=800
HEIGHT=600
window = mfb_open_ex("My Window", WIDTH, HEIGHT, MiniFB.WF_RESIZABLE)

buffer = zeros(UInt32, WIDTH*HEIGHT)
while true
# TODO add some rendering into the buffer
...
state = mfb_update(window,buffer)
if state != MiniFB.STATE_OK
break
end
end
``````

Examples

See the `example` directory for usage examples.

Author: Aviks
Source Code: https://github.com/aviks/MiniFB.jl

1631205995

Image Resolution and PPI in Computer Graphics

In this video, we're going to discuss Image Resolution and PPI (Pixels Per Inch) concepts in Computer Graphics. In the display screen, the number of horizontal and vertical pixels is called Resolution and the Image Resolution is specifically concerned with the total number of pixels (Height * Width of Image). Moreover, the Image Resolution is generally described in PPI (Pixels Per Inch). These two are quite important to understand to learn Computer Graphics. So, let's get started now.

00:00 Let's Start
00:30 What is a Pixel?
02:18 Resolution & Its Types
03:29 Image Resolution and PPI
06:08 Representation of PPI
07:49 Use of Calculating PPI with Example
09:07 How to Calculate PPI?
10:33 PPI Calculation Question with Solution
14:52 Closing Notes

#computerscience #computergraphics #pixel #imageresolution

1626272635

How to Root Google Pixel XL:

Rooting Google Pixel XL permits and give access to various features and updates that aren’t supported by default in your mobile. Why you should root your mobile Google Pixel XL?Would you like to remove the hurdles that come on the way to enjoy the latest updates? If yes then this is for you rooting the mobile allows to reach the level where you control and manage things according to your demand.It makes the software work efficiently.
• In the first step you need to download the Fastboot app and then extract it on your PC or laptop.
• Now download the IMG and ZIP these are versions of TWRP recovery.
• IMG version should be saved in the Fastboot folder.
• Simply transfer the ZIP and Magisk ZIP to your phone.You can open the setting and go to > Developer options and turn on both USB debugging and OEM unlocking.

You can connect your mobile with your computer using a USB cable and now Open the Fastboot folder.Simply hold down the Shift key , right-click anywhere and select open command window here.

Just hit enter by typing in the following command.
• Go to the setting option when your mobile boots back up, and then select the Developer option in the setting and enable USB debugging.Make sure you have connected your Mobile with PC.
• Just type in the following command by replacing or renaming twrp.img with your IMG file name and press the Enter key.
• You can unplug your mobile from your PC and after unplugging tap on Install the TWRP ZIP version and choose Reboot followed by Recovery.

1625822630

From Figma to (Near) Pixel Perfect Frontends

Today, I’m going to show you a workflow for accurately translating Figma layouts to near-pixel perfect results in the browser. This process involves converting pixel values based on typography and spacing withing Figma, to em and rem units on the frontend.

0:00 - Introduction
0:26 - An Awesome Offer
1:10 - Getting Started
3:30 - Converting Px to Em/Rems
5:29 - Hand over Plugin
15:30 - Is it pixel perfect?
16:33 - Responsive Considerations
18:00 - Closing

#figma #pixel

1621004407

Stop Using the Pixel Unit in CSS

Why do web developers use the `px` unit so blindly? It is just a bad habit? Is it because of a lack of knowledge of other units? Maybe because the design teams rely on `px` and `pt` for their mocks? It is unclear why the pixel is the current go-to unit for most teams.

Maybe, the main reason is that it looks simple and convenient. Intuitively, we think we understand this unit because it looks as though it is mapping our pixel screen.

The `px` unit is something that gets you started very easily, but it turns into a problem later down the road. In this article, I will expose the top three reasons to avoid the pixel unit. We will discuss the problems with its usage and some possible solutions.

1. They Are Just Optical Reference Units

Pixel values are no longer based on a hardware pixel. It just wouldn’t work and will look very different for many screens and resolutions. They are instead based on an optical reference unit. So the part that we found more intuitive about that unit is no longer there.

Hardware is changing by the day and pixel densities are growing. We can’t rely on the assumption that devices have a pixel density of `96dpi`. They are no longer a stable point of reference.

2. They Are Absolute Values

Looking at the problem above, why is it happening? Why can’t our layout reach pixel perfection? Because the pixel unit is an absolute one. That means that it is not going to adapt to our browser’s pixel ratio/resolution/size/etc.

3. Accessibility: They Don’t Adapt to the User’s Default Font Size

Accessibility is a forgotten subject that we all should be paying more attention to. How does the usage of pixel units impact accessibility?

Browsers let you configure your default base `font-size`. By default, it is set to `16px`, but it can be easily changed. That is very useful for people with visual impairment. The browser then gives us a hint about the preferred user’s `font-size` by setting the base `font-size` to that value.

However, if developers use absolute pixel values, that information will be ignored. The base `font-size` won’t have any impact on our application layout. The font size will be the same for all users. That is a bad thing since you are ignoring your user’s preferences and hurting your page’s accessibility.

#web-development #css #javascript #pixel

1603044000

Google Rolls Out Fixes for High-Severity Android System Flaws

Overall, 50 flaws were patched as part of Google’s October security update for the Android operating system, released on Monday. As part of this, Qualcomm, whose chips are used in Android devices, patched a mix of high- and critical-severity vulnerabilities tied to 22 CVEs.

Two elevation of privilege (EoP) issues, the most serious of the flaws, exist in the Android System component, the core of the operating system that’s on Android phones. These are two vulnerabilities (CVE-2020-0215 and CVE-2020-0416) that can be exploited remotely by an attacker using a specially crafted transmission. The flaws are fixed in Android versions 8.0, 8.1, 9, 10 and 11.

Also fixed in System are eight high-severity information-disclosure flaws (CVE-2020-0377, CVE-2020-0378, CVE-2020-0398, CVE-2020-0400, CVE-2020-0410, CVE-2020-0413, CVE-2020-0415 and CVE-2020-0422).

Three high-severity flaws also exist in the Media Framework (which offers support for playing a variety of common media types, so users can easily utilize audio, video and images). The three (CVE-2020-0213, CVE-2020-0411, CVE-2020-0414) could lead to remote information disclosure with no additional execution privileges needed.

Google also fixed five high-severity flaws in the Framework component, which is a set of APIs (consisting of system tools and user interface design tools) that allow developers to quickly and easily write apps for Android phones. These include two EoP flaws (CVE-2020-0420 and CVE-2020-0421), which enable a local malicious application to bypass user-interaction requirements in order to gain access to additional permissions. Three information-disclosure flaws (CVE-2020-0246, CVE-2020-0412, CVE-2020-0419) were also fixed.

Finally, Google fixed a high-severity EoP flaw (CVE-2020-0408) in Android runtime, the application runtime environment used by the Android OS. The vulnerability, which could enable a local attacker to execute arbitrary code within the context of an application that uses the library, was fixed in versions 8.0, 8.1, 9, 10 and 11.

Components

Google also rolled out patches for flaws in various third-party components in its Android ecosystem. One such flaw (CVE-2020-0423) exists in the kernel, which could enable a local attacker using a specially crafted file to execute arbitrary code within the context of a privileged process. Also fixed were several MediaTek components, including ones affecting the keyinstall, widevine and ISP components.

Finally, 22 critical and high-severity flaws were addressed in Qualcomm components, including four high-severity flaws in the kernel component (CVE-2020-11125, CVE-2020-11162, CVE-2020-11173, CVE-2020-11174) and six critical flaws (CVE-2020-3654, CVE-2020-3657, CVE-2020-3673, CVE-2020-3692, CVE-2020-11154 and CVE-2020-11155) in “closed-source components.”

#vulnerabilities #web security #(cve-2020-0215 #android #android security update #cve-2020-0416 #elevation of privilege #framework #google #information disclosure #kernel #media framework #october 2020 #pixel #qualcomm #samsung

1600592400

OLED Display as a Web Component

Let’s create a web component based on a hardware device!

** NOTE: I originally published this post to the Wokwi’s official blog.

In the following post, I will describe my personal experience in making a web component based on a hardware device, as part of contributing to “Wokwi-elements”. It’s an extremely cool open source library for “Arduino elements” made by Uri Shaked.

The creativity behind the Wokwi lib immediately caught my mind and I recognised an opportunity to play with new techniques and gain more experience with concepts I was experienced with.

#web-components #canvas #pixel #web-development #svg

1592703060

Designing for Developers – Pixel Pushers and Code Crunchers Unite!

Designing for developers. Some might say the two are a different breed, but in my experience there is one thing we will always have in common – the hunger for perfection. Sometimes we may see perfection in a different light, or even at the total opposite ends of the spectrum. However, ultimately, we usually share the same goals – to create something great, change people’s lives and make the world a better place.

#pixel