unity – Display/hide image with zoom in/out

After spending a while looking through the forums, I haven’t been able to find a thread that deals with transforms on an image.

Essentially, what I’m trying to do is display and hide an image at the start of a level in a game I’m working on. The image should start out large and with 100% transparency, then shrink to a certain size within the camera bounds with no transparency, idle for a second, then fade back out the way it came.

How would this be done programmatically? Thanks in advance!

How to select image from URL using PHP

Please, I want to extract images from one site to another through the url using PHP. How can I be able to skip the small images like avatar on the site and select the bigger ones that I need?
I am using PHP file_get_contents.

magento2 – Trying to call image in backend adminhtml less file

I am using below css property inside a less file

background: url(‘../images/button-read-more.png’) no-repeat left top;

this is addded in custom module

so wen image is being called it check at Magento/base module instead of Magento/backend


I am unable to find a solution .

magento2 load image when edit

I have data in the table. But when I click the edit button, the data of the image has not been loaded yet
. This is my code


namespace MageplazaHelloWorldModelPost;

use MageplazaHelloWorldModelResourceModelPostCollectionFactory;
use MagentoFrameworkAppRequestDataPersistorInterface;
use MagentoFrameworkAppObjectManager;
use MageplazaHelloWorldModelPostFileInfo;
use MagentoFrameworkFilesystem;

 * Class DataProvider
class DataProvider extends MagentoUiDataProviderAbstractDataProvider

 * @var MagentoCmsModelResourceModelBlockCollection
protected $collection;

 * @var DataPersistorInterface
protected $dataPersistor;
public $_storeManager;

 * @var array
protected $loadedData;

 * Constructor
 * @param string $name
 * @param string $primaryFieldName
 * @param string $requestFieldName
 * @param CollectionFactory $blockCollectionFactory
 * @param DataPersistorInterface $dataPersistor
 * @param array $meta
 * @param array $data

* @var Filesystem
private $fileInfo;

public function __construct(
$name, $primaryFieldName, $requestFieldName, CollectionFactory $blockCollectionFactory, DataPersistorInterface $dataPersistor, MagentoStoreModelStoreManagerInterface $storeManager, array $meta = (), array $data = ()
) {
    $this->collection = $blockCollectionFactory->create();
    $this->_storeManager = $storeManager;
    $this->dataPersistor = $dataPersistor;
    parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);

 * Get data
 * @return array
public function getData() {
    if (isset($this->loadedData)) {
        return $this->loadedData;
    $items = $this->collection->getItems();
    /** @var MagentoCmsModelBlock $block */
    foreach ($items as $block) {
        $block = $this->convertValues($block);
        $this->loadedData($block->getId()) = $block->getData();
        $temp = $block->getData();

    $data = $this->dataPersistor->get('postdata');

    if (!empty($data)) {
        $block = $this->collection->getNewEmptyItem();

        $this->loadedData($block->getId()) = $block->getData();


    return $this->loadedData;


private function convertValues($block)
    $fileName = $block->getFeaturedImage();

    $image = ();
    if ($this->getFileInfo()->isExist($fileName)) {
        $stat = $this->getFileInfo()->getStat($fileName);
        $mime = $this->getFileInfo()->getMimeType($fileName);
        $image(0)('name') = $fileName;
        $image(0)('url') = $block->getImageUrl();
        $image(0)('size') = isset($stat) ? $stat('size') : 0;
        $image(0)('type') = $mime;

    return $block;

 * Get FileInfo instance
 * @return FileInfo
 * @deprecated 101.1.0
private function getFileInfo()
    if ($this->fileInfo === null) {
        $this->fileInfo = ObjectManager::getInstance()->get(FileInfo::class);
    return $this->fileInfo;


enter image description here

enter image description here

I Think error if() in function convertValues

algorithms – Filling a hole in an image in O(nlogn)

I have a grayscale image (given by a float matrix with values between (0, 1)) with a hole in it (a cluster of pixels/cells with values of -1).


The boundary of the hole as all the cells that are 4-connected to a hole pixel (a pixel with -1 value) (you can read more about pixel connectivity here: https://en.wikipedia.org/wiki/Pixel_connectivity).

I(v) is the color of the pixel v.

I need the fill the hole using this formula:

Denote the boundary with B. So for each u – hole pixel:

I(u) = frac{Sigma_v{_in}_B w(u,v) * I(v))}{Sigma_v{_in}_B w(u,v)}

Where w is some arbitrary weighting function (for example using euclidean distance)

w(v,u) = frac{1}{|| u – v||}

Denote the number of hole pixels with n, the naive solution will be O(n^2), since for each hole pixel, we sum over all boundary pixels (and the upper bound for the amount of boundary pixels is 4n, of course).

I was told a solution could be achieved in O(nlogn), but I couldn’t think of anything even close to that.

I thought of doing some bitwise operations, but I reached a dead end. I also tried reusing computations, but I couldn’t find any.

Moreover, the way I see it, there’s no avoiding calculating w(u,v) for the n^2 pairs of hole/boundary pixels – which is already more than O(nlogn).

What am I missing? Could you point me at the right direction?


upload image error "An Ajax http request terminated abnormally.." on Google Chrome [closed]

My website i use Drupal 7.69

I use Google Chrome Version 83.0.4103.61 (Official Build) (64-bit)

when upload image it’s show


And click “Remove”


But i use Safari not have error.

Old Windows Wallpaper Image ‘shedinfield1024’ – Can anyone tell me where this photo was taken?

enter image description here
This is a photograph of an old farm building in a valley amongst wooded mountains. In the distance the roof of a white house with a red tile roof is visible.

javascript – I can’t clear the paint image in my Canvas

I’m trying to make the Mario move, but somehow it leaves traces behind, can anybody help???

var canvas = document.getElementById("screen");
var ctx = canvas.getContext("2d");
var mario;
var marioSprite;
var tiles;
var speedX = 1;

//marioSprite Specification
mario = {
    //target picture specification X & Y, Width & Height
    py: 44,
    pwidth: 16,
    pheight: 16,
    //drawing on Canvas specification X & Y, Width & Height
    cx: 16,
    cy: 116,

//draw Mario in Canvas
function drawMarioSprite(){
    marioSprite = new Image();
    marioSprite.src = "https://gamedev.stackexchange.com/file:///C:/Users/MASTONO ALI/Desktop/img/characters.gif";
    marioSprite.addEventListener('load', e => {
        mario.px, mario.py, mario.pwidth, mario.pheight, 
        mario.cx, mario.cy, mario.cwidth, mario.cheight);
    this.position = function() {
        this.mario.cx += speedX;       
}//drawMarioSprite() end

//drawTiles and tilesLoop
function drawTiles() {
    tiles = new Image();
    tiles.src = 'file:///C:/Users/MASTONO ALI/Desktop/img/tiles.png';
    tiles.addEventListener('load', e => {
function tilesLoop(){
    for (let x = 0; x < 25; x++){
        for (let y = 11; y < 13; y++){
                0, 0, 26, 26, 
                x*12, y*12, 20, 20);
}//drawTiles() end

function draw(){



thank you

theming – A simple way to add a background image to content region

I tried the background image module, but it give me various issues.

Is there a really simple way to add a background image to all the website on the content region?

The theme is Bartik.

theming – How to get BOOLEAN value of a Media Image in node.html.twig?

I was able to get the URL of the verctor_graphics reference media field with the following code:


But how can I get the boolean media field value (machine name: is_animated)?